cancel
Showing results for 
Search instead for 
Did you mean: 

flip of splayed / portioned tables

newstudent2017
New Contributor
Any example of the statement below ?
What is the symbol list for if you creating a flip ? Is it the subset of the column names


"With a symbol list on the left-hand side and an hsym symbol atom on the right-hand side, creates the flip of a splayed table. With a symbol list on the left-hand side and a non-hsym symbol atom on the right-hand side, creates the flip of a partitioned table. In either case, once the resulting object is flipped, the symbol list from the left-hand side becomes the columns of the table."
1 REPLY 1

TerryLynch
New Contributor II

When you flip a splay you get the following:

 

q)flip splayTab

`sym`col2`col3!`:splayTab/

 

(symbol list on the left-hand side and an hsym symbol atom on the right-hand side).

 

When you flip a partitioned table you get:

 

q)flip partitionTab

`time`val!`partitionTab

 

(symbol list on the left-hand side and a non-hsym symbol atom on the right-hand side).

 

In theory you can change the definition to change the available columns of the table:

 

q)`splayTab set flip `sym`col3!`:splayTab/

`splayTab

 

(once the resulting object is flipped, the symbol list from the left-hand side becomes the columns of the table).

 

 

Bonus, this is how .Q.qp determines if a table is flat, splayed or partitioned – it flips the input and checks for the presence of the “:” in an hsym symbol.

 

Terry