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 2022/09/25 13:12:23 UTC

[GitHub] [calcite] libenchao commented on a diff in pull request #2918: [CALCITE-5297] Casting dynamic variable twice throws exception

libenchao commented on code in PR #2918:
URL: https://github.com/apache/calcite/pull/2918#discussion_r979405386


##########
core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java:
##########
@@ -235,8 +235,11 @@ public class SqlValidatorImpl implements SqlValidatorWithHints {
 
   private int nextGeneratedId;
   protected final RelDataTypeFactory typeFactory;
-
-  /** The type of dynamic parameters until a type is imposed on them. */
+  /**
+   * The type of dynamic parameters until a type is imposed on them.
+   * It is assumed that dynamic parameter is nullable.
+   * See {@link #inferUnknownTypes(RelDataType, SqlValidatorScope, SqlNode)}

Review Comment:
   The fix seems right. However, I'm confused about the comment for `unknownType`, it is not only used for 'dynamic parameters' actually.



-- 
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: commits-unsubscribe@calcite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org