rubenada commented on code in PR #2838:
URL: https://github.com/apache/calcite/pull/2838#discussion_r903495119
##########
core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java:
##########
@@ -6661,6 +6661,11 @@ static class ExtendedExpander extends Expander {
SqlIdentifier sid = (SqlIdentifier) expr;
final SqlIdentifier fqId = getScope().fullyQualify(sid).identifier;
expr = expandDynamicStar(sid, fqId);
+ } else {
+ requireNonNull(expr, "expr");
+ SqlNode exprCopy = expr.clone(expr.getParserPosition());
Review Comment:
Could you please explain a bit the logic behind the fix? (maybe it is worth
to add a comment in the code).
As far as I can see, a clone of `expr` is created, using `expr`'s own
position, so an exact copy is generated; and somehow using this copy instead of
the original fixes the problem? (even though they are supposed to be equal, or
I am missing something?)
--
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]