Wanted to learn if this is by design.

Consider two tables: 'Fact' and 'Dim'. If we create two views FactView and
DimView (say, simple SELECT *), we cannot use these views in lattice
definition.

The Lattrice#populate (link below) only allows TableScan leaf nodes.
This method throws exception "Invalid node type LogicalProject in lattice
query"

https://github.com/apache/calcite/blob/67ece68208af8385c9e06b6b5cc812d6ad36293c/core/src/main/java/org/apache/calcite/materialize/Lattice.java#L181

I am still struggling to figure out why views (LogicalProject) should not
be allowed here. Any pointer will help.

Thanks!

Reply via email to