KX Community

Find answers, ask questions, and connect with our KX Community around the world.

Home Forums kdb+ Behavior of asc table

  • Behavior of asc table

    Posted by darrenwsun on July 4, 2022 at 12:00 am

    The doc on asc says

    > table, returns it sorted by the first non-key column and with the partitioned attribute set on it

    But when there is only one non-keyed column, it’s actually the sorted attribute that is set.

    q)meta asc ([c1:`a`b] c2:2 1) 
    c | t f a 
    --| ----- 
    c1| s 
    c2| j   s 
    
    q)meta asc ([c1:`a`b] c2:2 1; c3:01b) 
    c | t f a 
    --| ----- 
    c1| s 
    c2| j   p 
    c3| b

    Perhaps an incomplete doc? Wonder if there is other edge case.

    darrenwsun replied 2 months ago 2 Members · 1 Reply
  • 1 Reply
  • davidcrossey

    Member
    July 5, 2022 at 12:00 am

    Hi darrenwsun,

    Yes, this is expected behavior and we will update the documentation to reflect.

    Thanks for raising, I’ve created a GitHub issue for tracking.

    Kind regards,

    David

Log in to reply.