.z.pd function throwing error for non unique handles

https://learninghub.kx.com/forums/topic/z-pd-function-throwing-error-for-non-unique-handles

can someone help with the following error:


2024.06.05D00:02:14.371532071 | serverName | wdb | procname_wdb | ERR | runHooks | Failed to run hook(".eod.namespace1.functionname[tab1;tab2]";".z.pd - expected unique vector of int handles")

This process is started with " -s -2 "

the .z.pd function is defined like:

.z.pd:{$[.z.K<3.3;

u#int$();

u#exec w from .servers.getservers[proctype;sortworkertypes;()!();1b;0b]]

}


.z.pd is ->

u

int$()

The above is in one of the colums in a table

time query

-------------------------------------------------

2009.08.05D09:25:53.693765248 "function1[params]"

2012.08.18D19:47:01.117332288 "function2[params]"


and I run it as {@[value;xquery;{.log.error[name;"Message"]}]}each table

All the queries ran like this fail.
Important to mention that even though the process has " -s -2" the are not processes started as slaves.
However, the rest of the code works fine. It's just this bit that fails.

sorry about the formatting. it just doesn't work

Hi @user931206

Is it possible you could send a screenshot of the code rather than pasting it in the editor?

Apologies as this is a problem on our end, not yours.

Thanks,

Megan

Your function is using peach and setting -s -2, it is expecting handles on .z.pd, which is blank and hence failing.

Start your process


q -s 2

q).z.pd:u#int$()

q).z.pd

u#int$()

q){x+til 2} peach til 2

0 1

1 2

q)\s -2

q){x+til 2} peach til 2

'.z.pd - expected unique vector of int handles

[0] {x+til 10} peach til 10

^

q))

Hey

it would work in this instance, but there have been situations when I needed to give people the code to create a table for testing and a screenshot of the code wouldn't help anyone.