If we have query and materialized view as below:
The semantics of query and mv logic are the same. Materialized view matching failed, because field trimming is not done when canonicalizing the plans.
Currently Calcite does field trimming when convert sql to rel. But my company's internal system does materialization detection – – generates & transforms & stores the RelNode.
Shall we add the field trimming when canonicalizing materialized view logic?