julianhyde commented on code in PR #4289:
URL: https://github.com/apache/calcite/pull/4289#discussion_r2039910905
##########
core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java:
##########
@@ -399,10 +400,11 @@ public SqlConformance getConformance() {
SqlSelect select, boolean includeSystemVars) {
final List<SqlNode> list = new ArrayList<>();
final PairList<String, RelDataType> types = PairList.of();
+ final Map<String, SqlNode> expansions = new HashMap<>();
for (final SqlNode selectItem : selectList) {
final RelDataType originalType = getValidatedNodeTypeIfKnown(selectItem);
expandSelectItem(selectItem, select, first(originalType, unknownType),
- list, catalogReader.nameMatcher().createSet(), types,
+ list, catalogReader.nameMatcher().createSet(), types, expansions,
Review Comment:
I can't immediately think of a better way of doing this, but we discovered a
long time ago that mutation during validation was a bad idea.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]