[CALCITE-7717] Add a Collect.isValid method to check type invariants - #5180
[CALCITE-7717] Add a Collect.isValid method to check type invariants#5180mihaibudiu wants to merge 2 commits into
Conversation
|
The new method is invoked automatically by the planner so it is already used by the existing tests that create Collect nodes. |
de3580f to
cac102f
Compare
| if (getCollectionType() != SqlTypeName.MAP && inputRow.getFieldCount() == 1) { | ||
| // ARRAY or MULTISET over an input row with a single column: the type of | ||
| // the column should match the type of the array element | ||
| final RelDataType derivedFromColumn = |
There was a problem hiding this comment.
Should we also compare against a type derived via SqlTypeUtil.deriveCollectionQueryComponentType here for the ARRAY/MULTISET query-constructor case, as Collect.create(..., SqlKind, ...) does?
There was a problem hiding this comment.
I hope I understood your question
I have pushed a second commit, please take a look
There was a problem hiding this comment.
Yes, thanks. This is what I had in mind.
There was a problem hiding this comment.
If you like this, you can approve it.
Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
|



Jira Link
CALCITE-7717