XuQianJin-Stars commented on code in PR #2040:
URL: https://github.com/apache/fluss/pull/2040#discussion_r2579780224
##########
fluss-common/src/main/java/org/apache/fluss/row/InternalRow.java:
##########
@@ -228,6 +232,57 @@ static FieldGetter createFieldGetter(DataType fieldType,
int fieldPos) {
};
}
+ /**
+ * Creates a deep accessor for getting elements in an internal array data
structure at the given
+ * position. It returns new objects (GenericArray/GenericMap/GenericMap)
for nested
+ * array/map/row types.
+ *
+ * <p>NOTE: Currently, it is only used for deep copying {@link
ColumnarRow} for Arrow which
+ * avoid the arrow buffer is released before accessing elements. It
doesn't deep copy STRING and
+ * BYTES types, because {@link ColumnarRow} already deep copies the bytes,
see {@link
+ * VectorizedColumnBatch#getString(int, int)}. This can be removed once we
supports object reuse
+ * for Arrow {@link ColumnarRow}, see {@code
CompletedFetch#toScanRecord(LogRecord)}.
+ */
+ static FieldGetter createDeepFieldGetter(DataType fieldType, int fieldPos)
{
Review Comment:
Good job!
--
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]