I tried a query which has a pattern:

column IN (1212 + 1, 1212 + 2, 1212)

For the tuple, Calcite makes a plan like

UnionAll(all=[true])
  UnionAll(all=[true])
    Project(EXPR$0=[+(1212, 1)])
      Values
    Project(EXPR$0=[+(1212, 2)])
      Values
  Values

And I found one surprising thing. At planning time, ValuesPrel has the
correct RelRecordType

However, at execution, the schema of the recordbatch from scanning Values
is [`ZERO`(BIGINT: OPTIONAL),  `*`(BIGINT: OPTIONAL)].

I cannot make sense out of the second column (i.e., *). Does that serve
special purpose? Or is it a bug which we should try to remove? Its
existence causes some issues for UNION ALL.

Reply via email to