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/26 06:56:19 UTC

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

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


##########
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:
   I can remove the comment from here and add new comment near assignment operator like:
   ```
   /**
   * It is assumed that unknown type is nullable by default
   */
   unknownType = typeFactory.createTypeWithNullability(typeFactory.createUnknownType(), true);
   ```



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