Hi Vladimir, Really thanks for your help checking the cause. I am new to Calcite optimizer so wasn't able to figure out a way to debug the output of optimizer.
I will verify your idea and also learn how to use Graphviz (I think you were talking about this tool [1]) [1]: https://www.graphviz.org/ -Rui On Wed, Nov 13, 2019 at 8:52 AM Xiening Dai <[email protected]> wrote: > No, I didn’t get a chance. Thanks for diagnosing. > > > On Nov 13, 2019, at 7:55 AM, Vladimir Sitnikov < > [email protected]> wrote: > > > > Xiening, > > > > The bug is "obvious" when you open a Graphviz diagram. > > Just wondering: have you tried? > > > > The issue is EnumerableTableFunctionScan consumes Subset#0.NONE.[0] as an > > input, which is never implementable. > > > > The fix is trivial: EnumerableTableFunctionScanRule must convert inputs > to > > EnumerableConvention > > (e.g. see how EnumerableProjectRule converts input to enumerable) > > > > So getInputs() should be replaced with convertList(rel.getInputs(), > > EnumerableConvention.INSTANCE) > > Can you please try that? > > > > Vladimir > >
