huan233usc commented on code in PR #16913:
URL: https://github.com/apache/iceberg/pull/16913#discussion_r3510349121


##########
spark/v4.0/spark/src/main/java/org/apache/iceberg/spark/data/vectorized/ColumnVectorWithFilter.java:
##########
@@ -137,14 +142,21 @@ public ColumnVector getChild(int ordinal) {
     if (children == null) {
       synchronized (this) {
         if (children == null) {
+          int numChildren;
           if (dataType() instanceof StructType) {
             StructType structType = (StructType) dataType();
-            this.children = new ColumnVectorWithFilter[structType.length()];
-            for (int index = 0; index < structType.length(); index++) {
-              children[index] = new 
ColumnVectorWithFilter(delegate.getChild(index), rowIdMapping);
-            }
+            numChildren = structType.length();
+          } else if (dataType() instanceof CalendarIntervalType) {
+            numChildren = NUM_INTERVAL_CHILDREN;
+          } else if (dataType() instanceof VariantType) {
+            numChildren = NUM_VARIANT_CHILDREN;

Review Comment:
   cc @nssalian as some similar changes are also done in variant's vectorized 
reader pr
   
   
https://github.com/apache/iceberg/pull/16292/changes#diff-88a1429a7744bd132837f5a7bc9a6f5108e9e3f6a41f5232cf63e035cd791931



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to