caicancai commented on code in PR #4953:
URL: https://github.com/apache/calcite/pull/4953#discussion_r3347177724


##########
arrow/src/main/java/org/apache/calcite/adapter/arrow/ArrowTable.java:
##########
@@ -208,11 +197,43 @@ private static RelDataType deduceRowType(Schema schema,
     final RelDataTypeFactory.Builder builder = typeFactory.builder();
     for (Field field : schema.getFields()) {
       builder.add(field.getName(),
-          ArrowFieldTypeFactory.toType(field.getType(), typeFactory));
+          ArrowFieldTypeFactory.toType(field, typeFactory));
     }
     return builder.build();
   }
 
+  private @Nullable Projector makeProjector(ImmutableIntList fields) {
+    if (containsListField(fields)) {
+      // ArrowEnumerable will use ArrowDirectEnumerator when projector is null;

Review Comment:
   Good point, the comment was unclear.
   
   `makeProjector` normally creates a Gandiva `Projector` for identity 
projections. For Arrow `List` fields, Gandiva cannot handle that projection 
path, so this method intentionally returns `null`. `ArrowEnumerable` treats 
that as the direct-read path and uses `ArrowDirectEnumerator` to read the 
selected vectors directly.
   
   I updated the comment to make this explicit and avoid referring to a 
`projector` variable that is not visible in this scope.



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