It seems that BitSet adds complexity without fully solving the problem.

Maybe Correlate should use an expression (RexNode) to extract the variable 
value from a given row. It will usually be a RexInputRef but may be 
RexCall(ROW, RexInputRef, RexInputRef) or something more complicated, e.g. 
RexCall(ROW, RexInputRef, RexFieldAccess(RexFieldAccess, “myfield”)).


On Nov 24, 2014, at 12:48 PM, Vladimir Sitnikov <[email protected]> 
wrote:

>> Do you ever need to find the distinct values of the correl variable?
> 
> I do track the required columns in a bitset:
> https://github.com/vlsi/incubator-calcite/blob/correlate/core/src/main/java/org/apache/calcite/rel/core/Correlate.java#L87
> 
> As far as I understand, this approach (bitset field indices) will fail
> for recursive data types, since we won't have a luxury of
> RelStructuredTypeFlattener (recursive emp will bark at you if you try
> to flat-map its attributes all the way down to out of memory error).
> 
> Vladimir

Reply via email to