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



##########
File path: core/src/main/java/org/apache/calcite/rel/type/RelDataTypeImpl.java
##########
@@ -79,6 +79,10 @@ protected RelDataTypeImpl() {
 
   @Override public RelDataTypeField getField(String fieldName, boolean 
caseSensitive,
       boolean elideRecord) {
+    if (fieldList == null) {
+      throw new IllegalStateException("Requested field " + fieldName
+          + " in a type with null fieldList, type = " + this);

Review comment:
       I agree that `type with null fieldList` is too low-level for 
`RelDataType` users, however, I don't know the better message.
   
   The following might be slightly bit better: `"The current type " + this + " 
does not support named field lookup, so field " + fieldName + " can't be 
located"`




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