Hi, RelOptTableImpl#toRel uses if-else logic and it creates LogicalTableScan or EnumerableTableScan depending on table instance and some properties. Does anybody know why can't it always create LogicalTableScan and use rules to convert it to EnumerableTableScan later?
The current logic of creating EnumerableTableScan hurts for cases like RelToSqlConverterStructsTest. The test in question uses its own Table implementation (that is new Table()), and the RelOptTableImpl#toRel tries to create EnumerableTableScan out of it. It looks weird as the table could not be implemented anyway, so why don't we create LogicalTableScan there? I have filed https://github.com/apache/calcite/pull/1721 to see what breaks, but it does not seem right to me to EnumerableTableScan which is known to be non-implementable. Vladimir
