vlsi commented on a change in pull request #2135:
URL: https://github.com/apache/calcite/pull/2135#discussion_r495616152
##########
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:
Just in case, there's `getSqlIdentifier`:
```java
public SqlTypeName getSqlTypeName() {
// The implementations must provide non-null value, however, we keep
this for compatibility
return castNonNull(null);
}
public @Nullable SqlIdentifier getSqlIdentifier() {
SqlTypeName typeName = getSqlTypeName();
if (typeName == null) {
return null;
}
```
So I would keep the method return null as before.
----------------------------------------------------------------
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]