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 2021/01/27 03:51:59 UTC

[GitHub] [calcite] xwkuang5 commented on a change in pull request #2326: [CALCITE-4265] Improve error message when CAST to unknown type (Louis

xwkuang5 commented on a change in pull request #2326:
URL: https://github.com/apache/calcite/pull/2326#discussion_r565007986



##########
File path: core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java
##########
@@ -1759,6 +1759,9 @@ protected SqlSelect createSourceSelectForDelete(SqlDelete call) {
   @Override public RelDataType getValidatedNodeType(SqlNode node) {
     RelDataType type = getValidatedNodeTypeIfKnown(node);
     if (type == null) {
+      if (node.isA(ImmutableSet.of(SqlKind.IDENTIFIER))) {
+        throw newValidationError(node, RESOURCE.unknownIdentifier(node.toString()));

Review comment:
       Done.
   
   I forced push the commit since this is a small change whose history probably should not be kept. Curious what the recommended approach is for ammending PRs in calcite. 




----------------------------------------------------------------
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