Hi Masayuki, Your suggestions helped quite a bit. The mistake i was making was trying to create a tree without ANY enumerable or bindable traits, since after the optimization phase, i really dont need to "execute" anything. I just wished to print the optimal/re-shuffled tree in a special readable way.
Your "catch all" converter (CassandraToEnumerableConverter) was part of the solution i.e (rel#7:Subset#1) I also was making the mistake of not setting the root of the tree to a top level EnumerableConvention/BindableConvention. This led to the other problem i.e (rel#4:Subset#1.NONE.[]) with best=null. I fixed this with the following RelNode project = relBuilder.build() RelNode root = cluster.planner.changeTraits(project, project.traitSet.replace(EnumerableConvention.INSTANCE).simplify()) cluster.planner.setRoot(root) Thanks for all your help! Regds Abbas On Saturday, 17 March 2018 11:37 PM, Masayuki Takahashi <[email protected]> wrote: I mistook a sentence. wrong: This rel was selected at Set#1 because this one is ENUMERABLE and "best=null". correct: This rel was selected at Set#1 because this one is ENUMERABLE. "best=null" is the cause of the error. thanks. -- Masayuki Takahashi
