Hi,

I found there are some RelCompositeTrait related issues:
https://issues.apache.org/jira/browse/CALCITE-2010
https://issues.apache.org/jira/browse/CALCITE-2593
https://issues.apache.org/jira/browse/CALCITE-2764

Multi-sorted table are rare in pratice, mutil-distributed table doesn't exist 
either. Values node with several tuples is not worth optimization, with many 
tuples is not worth optimization either, because the time it takes optimizer to 
figure out the ordering may be longer than just sort it in runtime.

In issue https://issues.apache.org/jira/browse/CALCITE-1990,
Leo extended RelDistribution to inherit RelMultipleTrait, just like 
RelCollation does, to solve his problem in the example. But I don't think this 
is an appropriate way to represent the equivalence classes (in PostgreSQL's 
term). 

So why did we introduce RelCompisteTrait and RelMultipleTrait in the beginning? 
Seems like it gives us more pain than gain.

Thanks ~
Haisheng Yuan

Reply via email to