vlsi commented on a change in pull request #2135:
URL: https://github.com/apache/calcite/pull/2135#discussion_r483518549



##########
File path: core/src/main/java/org/apache/calcite/rel/type/RelDataTypeImpl.java
##########
@@ -217,6 +217,12 @@ public int getScale() {
     return SCALE_NOT_SPECIFIED;
   }
 
+  /**
+   * Gets the {@link SqlTypeName} of this type.
+   * Sub-classes must override the method to ensure the resulting value is 
non-nullable.
+   *
+   * @return SqlTypeName, never null
+   */
   public SqlTypeName getSqlTypeName() {
     return null;

Review comment:
       I would love to `un-implement` the method, however, it might happen that 
there is third-party code that extends the class, and it keeps the default 
`return null` implementation. It might even be the case that the default `null` 
implementation works because the code never tries to call methods on the result 
of `getSqlTypeName()`.
   
   That is why I'm inclined to keep the default `return null`, and deal with it 
later (e.g. announce the method would become abstract in 6 months).




----------------------------------------------------------------
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:
[email protected]


Reply via email to