ericyuan915 commented on code in PR #19210:
URL: https://github.com/apache/hudi/pull/19210#discussion_r3532737407
##########
hudi-flink-datasource/hudi-flink1.19.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) {
Review Comment:
Good callout, but it seems duplicated by design — the whole
cow/vector/reader package is copied across all 5 Flink version modules because
it binds to version-specific Flink types (ColumnVector/AbstractHeapVector), so
a shared util would have to pin one Flink version and couldn't serve the rest.
Hoisting one 6-line helper wouldn't dent the real duplication. We can prob open
an issue for a separate package-wide refactor instead.
--
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]