Impala Public Jenkins has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/24190 )

Change subject: IMPALA-14882: part1: Convert arrow record batch to impala tuple 
batch
......................................................................

IMPALA-14882: part1: Convert arrow record batch to impala tuple batch

Added efficient conversion from an arrow record batch to a batch of
impala tuples.
Previously, there existed a conversion in paimon jni reader that
converted arrow arrays row-by-row. The new conversion writes all rows
per column (i.e. all elements of an arrow array into the corresponding
slots in the impala tuples) for each column/field/slot.
Fixed size parts of tuples have to be pre-allocated in a contiguous
memory, so that columnar writes can be efficient (i.e. a tuple's memory
can be calculated as base_ptr + index * tuple_size).

Paimon jni scan node was modified to convert the arrow record first into
a scratch batch, then apply filtered rows to the output batch, similarly
to how file readers work (e.g. HdfsParquetScanner).

This patch does not handle nested types (array/list, struct, map).

Testing:
-added arrow-converter-test.cc with tests for converting different types
-added some paimon query tests for edge cases previously not covered
-ran paimon tests locally

Measurement:
-added arrow-converter-benchmark for converting different types

Change-Id: Iea544b3c71d9211c893f0fec3527ebe84155ebcd
Assisted-by: Claude Opus 5.5 (GitHub Copilot)
Reviewed-on: http://gerrit.cloudera.org:8080/24190
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
---
M be/src/benchmarks/CMakeLists.txt
A be/src/benchmarks/arrow-converter-benchmark.cc
M be/src/exec/CMakeLists.txt
A be/src/exec/arrow-converter-test.cc
A be/src/exec/arrow-converter.cc
A be/src/exec/arrow-converter.h
M be/src/exec/paimon/CMakeLists.txt
D be/src/exec/paimon/paimon-jni-row-reader.cc
D be/src/exec/paimon/paimon-jni-row-reader.h
M be/src/exec/paimon/paimon-jni-scan-node.cc
M be/src/exec/paimon/paimon-jni-scan-node.h
M be/src/exec/scratch-tuple-batch.h
M be/src/runtime/string-value.h
M be/src/testutil/desc-tbl-builder.cc
M be/src/testutil/desc-tbl-builder.h
M common/thrift/Frontend.thrift
M fe/src/main/java/org/apache/impala/analysis/DescriptorTable.java
M fe/src/main/java/org/apache/impala/service/JniFrontend.java
M testdata/workloads/functional-query/queries/QueryTest/paimon-query.test
19 files changed, 1,953 insertions(+), 513 deletions(-)

Approvals:
  Impala Public Jenkins: Looks good to me, approved; Verified

--
To view, visit http://gerrit.cloudera.org:8080/24190
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Iea544b3c71d9211c893f0fec3527ebe84155ebcd
Gerrit-Change-Number: 24190
Gerrit-PatchSet: 46
Gerrit-Owner: Balazs Hevele <[email protected]>
Gerrit-Reviewer: Balazs Hevele <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Xuebin Su <[email protected]>
Gerrit-Reviewer: ji chen <[email protected]>
Gerrit-Reviewer: jichen <[email protected]>

Reply via email to