hudi-agent commented on code in PR #19210:
URL: https://github.com/apache/hudi/pull/19210#discussion_r3532665564
##########
hudi-flink-datasource/hudi-flink1.18.x/src/main/java/org/apache/hudi/table/format/cow/vector/reader/NestedColumnReader.java:
##########
@@ -271,6 +286,22 @@ private Tuple2<LevelDelegation, WritableColumnVector>
readPrimitive(
return Tuple2.of(reader.getLevelDelegation(), writableColumnVector);
}
+ /**
+ * The length of the {@code isNull}-backed storage that {@code vector} (a
row child) is indexed
+ * against by the null-collapse loop in {@link #readRow}. Every row child is
an {@link
+ * AbstractHeapVector} (nested rows/arrays/maps and all non-decimal
primitives) or a {@link
+ * ParquetDecimalVector} wrapping one (DECIMAL leaves; see {@code
+ * NestedPrimitiveColumnReader#fillColumnVector}); unwrapping the latter
yields an {@code
+ * AbstractHeapVector} in all cases.
+ */
+ private static int vectorLength(ColumnVector vector) {
+ ColumnVector storage =
Review Comment:
🤖 nit: could you rename `storage` to `unwrapped` (or `heapVector`)? The
ternary is doing a decimal-wrapper unwrap, and a name that signals that intent
makes the two-step clearer at a glance without needing to re-read the Javadoc.
Same applies to the identical copy in the other four Flink-version modules.
<sub><i>⚠️ AI-generated; verify before applying. React 👍/👎 to flag
quality.</i></sub>
--
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]