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/03/01 04:13:50 UTC

[GitHub] [calcite] liyafan82 commented on a change in pull request #2356: [CALCITE-4510] RexLiteral can produce wrong digest for some user defined types

liyafan82 commented on a change in pull request #2356:
URL: https://github.com/apache/calcite/pull/2356#discussion_r584436381



##########
File path: core/src/main/java/org/apache/calcite/rel/type/RelDataType.java
##########
@@ -40,6 +40,11 @@
   int SCALE_NOT_SPECIFIED = Integer.MIN_VALUE;
   int PRECISION_NOT_SPECIFIED = -1;
 
+  /**
+   * Suffix for the digests of non-nullable types.
+   */
+  String NON_NULLABLE_TYPE_DIGEST_SUFFIX = " NOT NULL";

Review comment:
       @vlsi 's concern sounds reasonable, so I have moved the literal to class `RelDataTypeImpl` according to @rubenada 's suggestion.
   
   IMO, extracting a constant to a static final field makes the code more structured and maintainable, and it also helps avoiding some bugs and typos (like the one in this issue).




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