JiajunBernoulli commented on code in PR #2843:
URL: https://github.com/apache/calcite/pull/2843#discussion_r912339043


##########
core/src/main/java/org/apache/calcite/adapter/enumerable/JavaRowFormat.java:
##########
@@ -82,6 +83,11 @@ public enum JavaRowFormat {
         JavaTypeFactory typeFactory,
         RelDataType type) {
       assert type.getFieldCount() == 1;
+      RelDataType field0Type = type.getFieldList().get(0).getType();

Review Comment:
   Does the code can be simplified?
   ```      
         RelDataType field0Type = type.getFieldList().get(0).getType();
         // nested ROW type is always represented as array.
         return field0Type.getSqlTypeName() == SqlTypeName.ROW
             ? Object[].class
             : typeFactory.getJavaClass(field0Type);
       ```



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

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to