cjj2010 commented on code in PR #4912:
URL: https://github.com/apache/calcite/pull/4912#discussion_r3285464193
##########
core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java:
##########
@@ -7530,7 +7531,7 @@ private SqlNode expandExprFromJoin(SqlJoin join,
SqlIdentifier identifier, Selec
final SqlIdentifier exp =
new SqlIdentifier(
ImmutableList.of(child.name, name),
- identifier.getParserPosition());
+ SqlParserPos.ZERO);
Review Comment:
Sorry, I didn't reply to your message in a timely manner yesterday. After
further debugging this part of the code, I believe what you said is correct.
For this fix, changing SqlParserPos.ZERO is unnecessary. The core fix is to
move the validation before the extension (via validateSelectCommonColumns /
validateNoQualifiedCommonColumns), so the extension code no longer requires
validation. I have reverted the location change - the identifier after
extension will continue to carry the source location of the original
identifier, which retains useful context information for runtime error
reporting.
--
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]