n:( a:1 2 3; b:4 5 6) m:( c:1 2 ; d: 7 8 ) I want to do equijoin col a and col c as equivalent. How do I do it ?
You could rename one of the columns.
q)n:( a:1 2 3; b:4 5 6)
q)m:( c:1 2 ; d: 7 8 )
q)ej[a;n;
a xcol m]
a b d
-----
1 4 7
2 5 8
q)ej[c;
c xcol n;m]
c b d
-----
1 4 7
2 5 8
Regards,
Paul
I wanted a solution without renaming the columns.
Bump :-)
Paul’s answer is the most sensible one, not sure why you dismissed it.
Renaming columns is a trivial operation.
Terry
xcols makes a new table which could be very time consuming / memory expensive for some operations. Any other idea without renaming it
As others have been saying it isn’t due to ref counting
Your intuition in this case is wrong
Try and measure it yourself