Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
似乎我们无法以与未键控相同的方式从键控表中获取不同的值:
t:([a:1 2]b:3 4) ?[t;();0b;()] // keyed table ?[0!t;();1b;()] // unkeyed table ?[t;();1b;()] // err 'type
为什么我们这里有这个错误?
我怀疑这与您无法在字典上区分的原因相同-它模棱两可。您打算对键或值应用 distinct 吗?我认为 kdb 不会选择一方,所以它会让你自己做。
q)t:([]a:1 1 1 2 2;b:10 12 10 14 14) q)select distinct from t a b ---- 1 10 1 12 2 14 q)select distinct from 1!t 'type q)distinct `a`b`c!(1;"ab";enlist 1b) 'type