Skip to content

Replace conversion of binary->string in arrow-row from arraydata to direct construction#10261

Open
Jefffrey wants to merge 1 commit into
apache:mainfrom
Jefffrey:replace-array-data-row
Open

Replace conversion of binary->string in arrow-row from arraydata to direct construction#10261
Jefffrey wants to merge 1 commit into
apache:mainfrom
Jefffrey:replace-array-data-row

Conversation

@Jefffrey

@Jefffrey Jefffrey commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

Missed by #10229 as it used the into_data() API (I was grepping just for ArrayData). Instead of roundtripping through arraydata to convert from a binary to string, just directly use into_parts() and new_unchecked() for optimization.

What changes are included in this PR?

Remove arraydata roundtrip in favour of deconstructing with into_parts() and constructing with new_unchecked()

Are these changes tested?

Existing tests

Are there any user-facing changes?

No

@github-actions github-actions Bot added the arrow Changes to the arrow crate label Jul 2, 2026
@Jefffrey Jefffrey force-pushed the replace-array-data-row branch from af3bc6c to 08c57a3 Compare July 2, 2026 00:27
@Jefffrey

Jefffrey commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

run benchmark row_format
env:
BENCH_FILTER: convert_rows.*string

@adriangbot

Copy link
Copy Markdown

🤖 Arrow criterion benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4861132878-791-qgbbr 6.12.85+ #1 SMP Mon May 11 08:17:35 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

Comparing replace-array-data-row (08c57a3) to 32bba5a (merge-base) diff
BENCH_NAME=row_format
BENCH_COMMAND=cargo bench --features=arrow,async,test_common,experimental,object_store --bench row_format
BENCH_FILTER=convert_rows.*string
Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Arrow criterion benchmark completed (GKE) | trigger

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Details

group                                                                                                             main                                   replace-array-data-row
-----                                                                                                             ----                                   ----------------------
convert_rows 4096 4096 string_dictionary(20, 0.5), string_dictionary(30, 0), string_dictionary(100, 0), i64(0)    1.02    229.7±0.58µs        ? ?/sec    1.00    224.1±0.44µs        ? ?/sec
convert_rows 4096 string view(1..100, 0)                                                                          1.01     78.8±0.37µs        ? ?/sec    1.00     77.7±0.26µs        ? ?/sec
convert_rows 4096 string view(1..100, 0.5)                                                                        1.06     68.5±0.40µs        ? ?/sec    1.00     64.7±0.31µs        ? ?/sec
convert_rows 4096 string view(10, 0)                                                                              1.01     42.9±0.05µs        ? ?/sec    1.00     42.7±0.06µs        ? ?/sec
convert_rows 4096 string view(100, 0)                                                                             1.00     97.1±0.08µs        ? ?/sec    1.00     96.8±0.09µs        ? ?/sec
convert_rows 4096 string view(100, 0.5)                                                                           1.00     62.3±0.14µs        ? ?/sec    1.00     62.5±0.13µs        ? ?/sec
convert_rows 4096 string view(30, 0)                                                                              1.01     58.2±0.03µs        ? ?/sec    1.00     57.8±0.06µs        ? ?/sec
convert_rows 4096 string(10, 0)                                                                                   1.00     40.3±0.04µs        ? ?/sec    1.00     40.2±0.03µs        ? ?/sec
convert_rows 4096 string(100, 0)                                                                                  1.01     99.3±0.13µs        ? ?/sec    1.00     98.0±0.15µs        ? ?/sec
convert_rows 4096 string(100, 0.5)                                                                                1.03     63.4±0.17µs        ? ?/sec    1.00     61.4±0.27µs        ? ?/sec
convert_rows 4096 string(20, 0.5), string(30, 0), string(100, 0), i64(0)                                          1.00    224.8±0.40µs        ? ?/sec    1.00    225.4±0.43µs        ? ?/sec
convert_rows 4096 string(30, 0)                                                                                   1.02     64.6±0.11µs        ? ?/sec    1.00     63.5±0.08µs        ? ?/sec
convert_rows 4096 string_dictionary(10, 0)                                                                        1.00     40.5±0.04µs        ? ?/sec    1.00     40.4±0.04µs        ? ?/sec
convert_rows 4096 string_dictionary(100, 0)                                                                       1.00     99.0±0.10µs        ? ?/sec    1.00     99.2±0.11µs        ? ?/sec
convert_rows 4096 string_dictionary(100, 0.5)                                                                     1.04     63.7±0.21µs        ? ?/sec    1.00     61.5±0.21µs        ? ?/sec
convert_rows 4096 string_dictionary(30, 0)                                                                        1.00     64.0±0.06µs        ? ?/sec    1.02     65.5±0.24µs        ? ?/sec
convert_rows 4096 string_dictionary_low_cardinality(10, 0)                                                        1.00     40.5±0.03µs        ? ?/sec    1.00     40.5±0.05µs        ? ?/sec
convert_rows 4096 string_dictionary_low_cardinality(100, 0)                                                       1.00     98.5±0.08µs        ? ?/sec    1.01     99.0±0.10µs        ? ?/sec
convert_rows 4096 string_dictionary_low_cardinality(30, 0)                                                        1.01     64.0±0.08µs        ? ?/sec    1.00     63.6±0.07µs        ? ?/sec

Resource Usage

base (merge-base)

Metric Value
Wall time 190.0s
Peak memory 13.4 MiB
Avg memory 8.7 MiB
CPU user 183.7s
CPU sys 0.0s
Peak spill 0 B

branch

Metric Value
Wall time 185.0s
Peak memory 12.0 MiB
Avg memory 8.5 MiB
CPU user 182.2s
CPU sys 0.0s
Peak spill 0 B

File an issue against this benchmark runner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arrow Changes to the arrow crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants