You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2019/12/16 07:27:28 UTC
[GitHub] [calcite] chunweilei commented on a change in pull request #1664:
[CALCITE-3589] SqlValidatorException when conformation is set to LENIENT
chunweilei commented on a change in pull request #1664: [CALCITE-3589] SqlValidatorException when conformation is set to LENIENT
URL: https://github.com/apache/calcite/pull/1664#discussion_r358082101
##########
File path: core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java
##########
@@ -5972,7 +5972,9 @@ protected SqlNode visitScoped(SqlCall call) {
int n = 0;
for (SqlNode s : select.getSelectList()) {
final String alias = SqlValidatorUtil.getAlias(s, -1);
- if (alias != null && nameMatcher.matches(alias, name)) {
+ if (alias != null && nameMatcher.matches(alias, name)
+ && s instanceof SqlBasicCall //only "expr as alias" need expand, but A as A no need
+ && !s.hasUnderlyingColumnSameAsAlias(alias)) {
expr = s;
Review comment:
We don't write comments at the end of the line.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services