Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
546 views
in Technique[技术] by (71.8m points)

kdb - FK field over IPC

Some prerequisites on the remote process:

q)p 15222
q)t:([id:10 20 30]data:`aa`bb`cc);
q)kt:([]id:`t$10 20 20 30 30 30; num:til 6);

and the following will be performed on a local process:

  1. The size of kt looks the same from both sides:
q)-22!`::15222 "kt"
138
q)`::15222 "-22!kt"
138
  1. But meta's are different:
q)`::15222 "meta kt"
c  | t f a
---| -----
id | j t
num| j
q)meta `::15222 "kt"
c  | t f a
---| -----
id | j
num| j

Why is it so? - why the transferred table does not contain a whole information as its source (despite of the sizes are the same)?


I suspect this somehow related to enums - q completely removes enum info - is it true?:

// remote
q)e:`a`b`c;
q)e1:`e$`b`a`c`c`a`b;
// local
q)`::15222 "type e1"
20h
q)type `::15222 "e1"
11h
question from:https://stackoverflow.com/questions/65881891/fk-field-over-ipc

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Yes, enums (and thus foreign keys) aren't preserved when transported over IPC to another process.

Equal length from -22! doesn't mean identical content.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...