Table cols定义

问题描述 投票:0回答:1

kdb +中使用了许多技巧来处理带键/展开/分区和简单表。我看到许多.Q函数可作为这些品种的基础。其中之一是cols。对于其中一种情况,您能帮我吗?11h=情况代表什么?

cols
k){$[
  .Q.qp x:.Q.v x; / If partitioned
  .Q.pf,!+x;      /   add "partitioned field" to table cols
  98h=@x;         / If simple table
  !+x;            /   just table cols (convert to dict of lists, get keys)
  11h=@!x;        / ?
  !x;
  !+0!x           / (keys-dict)!(data-dict): remove keys, get table cols
  ]}
kdb k
1个回答
0
投票

用于字典:

q)cols`a`b`c!1 2 3
`a`b`c

[键(@)的类型(!)是符号列表(11h)的]

© www.soinside.com 2019 - 2024. All rights reserved.