You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "cakeni (via GitHub)" <gi...@apache.org> on 2026/08/11 11:47:44 UTC

[PR] Replace substring BufferBuilders with Vec [arrow-rs]

cakeni opened a new pull request, #10634:
URL: https://github.com/apache/arrow-rs/pull/10634

   # Which issue does this PR close?
   
   Part of #10245.
   
   # Rationale for this change
   
   `Vec` provides the same capacity preallocation and append behavior needed by `substring_by_char_impl` without the additional `BufferBuilder` abstraction.
   
   # What changes are included in this PR?
   
   - Replace the byte-value `BufferBuilder` with `Vec<u8>`.
   - Replace the offset `BufferBuilder` with `Vec<OffsetSize>`.
   - Preserve the existing capacity estimates, null handling, and offset construction.
   
   # Are there any user-facing changes?
   
   No.
   
   # How was this change tested?
   
   - `cargo +stable-x86_64-pc-windows-gnu fmt --all -- --check`
   - `cargo +stable-x86_64-pc-windows-gnu clippy -p arrow-string --all-targets --all-features --no-deps -- -D warnings`
   - `cargo +stable-x86_64-pc-windows-gnu test -p arrow-string --all-features` (182 unit tests and 10 doc tests passed)


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Replace substring BufferBuilders with Vec [arrow-rs]

Posted by "Jefffrey (via GitHub)" <gi...@apache.org>.
Jefffrey commented on PR #10634:
URL: https://github.com/apache/arrow-rs/pull/10634#issuecomment-5263985217

   @cakeni i noticed you raised quite a lot of PRs in a short span of time; especially these PRs have the same timestamps:
   
   - https://github.com/apache/arrow-rs/pull/10635
   - https://github.com/apache/arrow-rs/pull/10636
   - https://github.com/apache/arrow-rs/pull/10637
   
   could you explain this? are they truly PRs raised by you or was there an AI agent involved with this?


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Replace substring BufferBuilders with Vec [arrow-rs]

Posted by "Jefffrey (via GitHub)" <gi...@apache.org>.
Jefffrey merged PR #10634:
URL: https://github.com/apache/arrow-rs/pull/10634


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Replace substring BufferBuilders with Vec [arrow-rs]

Posted by "cakeni (via GitHub)" <gi...@apache.org>.
cakeni commented on PR #10634:
URL: https://github.com/apache/arrow-rs/pull/10634#issuecomment-5269888579

   Yes, AI assistance was involved in preparing some of these PRs. I reviewed the changes, diffs, and test results before submitting them.
   
   The similar timestamps are because I was working on several independent issues in parallel and submitted the PRs around the same time.
   
   I understand that opening several PRs at once can make review harder for maintainers, so I’ll slow down and wait for feedback on the existing PRs before opening more.
   


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Replace substring BufferBuilders with Vec [arrow-rs]

Posted by "Jefffrey (via GitHub)" <gi...@apache.org>.
Jefffrey commented on PR #10634:
URL: https://github.com/apache/arrow-rs/pull/10634#issuecomment-5312743878

   could you please add an AI disclosure to your PRs if AI assistance has been used in generating them


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Replace substring BufferBuilders with Vec [arrow-rs]

Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #10634:
URL: https://github.com/apache/arrow-rs/pull/10634#issuecomment-5343848371

   🤖 Arrow criterion benchmark completed (GKE) | [trigger](https://github.com/apache/arrow-rs/pull/10634#issuecomment-5343765499)
   
   **Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB)
   
   Comparing perf/arrow-string-substring-vecs (a35d3fe0b73189246cd9e1ec467a8d942b1d44b0) to 7ec3f5a (merge-base) [diff](https://github.com/apache/arrow-rs/compare/7ec3f5ab0c41f10ece65d3745b989ddde510539b..a35d3fe0b73189246cd9e1ec467a8d942b1d44b0)
   
   <details><summary>Run configuration</summary>
   
   ```yaml
   run benchmark substring_kernels
   ```
   
   </details>
   
   <details><summary>CPU Details (lscpu)</summary>
   
   ```
   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>
   
   <details><summary>Details</summary>
   <p>
   
   ```
   group                                               main                                   perf_arrow-string-substring-vecs
   -----                                               ----                                   --------------------------------
   substring by char (ascii, prefix)                   1.04      4.4±0.08ms        ? ?/sec    1.00      4.2±0.25ms        ? ?/sec
   substring by char (ascii, tail)                     1.06      4.5±0.05ms        ? ?/sec    1.00      4.3±0.09ms        ? ?/sec
   substring by char (non-ascii, prefix)               1.00  1596.1±56.39µs        ? ?/sec    1.03   1636.3±9.33µs        ? ?/sec
   substring by char (non-ascii, tail)                 1.00  1498.5±22.84µs        ? ?/sec    1.03  1543.1±52.96µs        ? ?/sec
   substring fixed size binary array                   1.02     19.7±0.34ms        ? ?/sec    1.00     19.3±0.28ms        ? ?/sec
   substring utf8 (start = 0, length = None)           1.00     20.3±0.25ms        ? ?/sec    1.10     22.3±0.42ms        ? ?/sec
   substring utf8 (start = 1, length = str_len - 1)    1.00     22.2±0.82ms        ? ?/sec    1.05     23.4±0.19ms        ? ?/sec
   substring utf8 by char                              1.00     26.1±0.23ms        ? ?/sec    1.06     27.6±0.12ms        ? ?/sec
   ```
   
   </p>
   </details>
   
   <details><summary>Resource Usage</summary>
   
   **base (merge-base)**
   | Metric | Value |
   |--------|-------|
   | Wall time | 90.0s |
   | Peak memory | 272.0 MiB |
   | Avg memory | 214.1 MiB |
   | CPU user | 53.6s |
   | CPU sys | 33.3s |
   | Peak spill | 0 B |
   
   **branch**
   | Metric | Value |
   |--------|-------|
   | Wall time | 95.0s |
   | Peak memory | 272.0 MiB |
   | Avg memory | 207.8 MiB |
   | CPU user | 52.9s |
   | CPU sys | 35.2s |
   | Peak spill | 0 B |
   </details>
   
   
   ---
   [File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Replace substring BufferBuilders with Vec [arrow-rs]

Posted by "Jefffrey (via GitHub)" <gi...@apache.org>.
Jefffrey commented on PR #10634:
URL: https://github.com/apache/arrow-rs/pull/10634#issuecomment-5343876180

   run benchmark substring_kernels
   env:
     BENCH_FILTER: char


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Replace substring BufferBuilders with Vec [arrow-rs]

Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #10634:
URL: https://github.com/apache/arrow-rs/pull/10634#issuecomment-5343902514

   🤖 Arrow criterion benchmark running (GKE) | [trigger](https://github.com/apache/arrow-rs/pull/10634#issuecomment-5343876180)
   **Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB) | `Linux bench-c5343876180-1757-dz5dm 6.12.85+ #1 SMP Wed Jun 17 20:31:55 UTC 2026 aarch64 GNU/Linux`
   <details><summary>CPU Details (lscpu)</summary>
   
   ```
   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>
   
   Comparing perf/arrow-string-substring-vecs (a35d3fe0b73189246cd9e1ec467a8d942b1d44b0) to 7ec3f5a (merge-base) [diff](https://github.com/apache/arrow-rs/compare/7ec3f5ab0c41f10ece65d3745b989ddde510539b..a35d3fe0b73189246cd9e1ec467a8d942b1d44b0)
   
   <details><summary>Run configuration</summary>
   
   ```yaml
   run benchmark substring_kernels
   env:
     BENCH_FILTER: "char"
   ```
   
   </details>
   
   BENCH_COMMAND=cargo bench --features=arrow,async,test_common,experimental,object_store --bench substring_kernels
   Results will be posted here when complete
   
   ---
   [File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Replace substring BufferBuilders with Vec [arrow-rs]

Posted by "Jefffrey (via GitHub)" <gi...@apache.org>.
Jefffrey commented on PR #10634:
URL: https://github.com/apache/arrow-rs/pull/10634#issuecomment-5343765499

   run benchmark substring_kernels


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Replace substring BufferBuilders with Vec [arrow-rs]

Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #10634:
URL: https://github.com/apache/arrow-rs/pull/10634#issuecomment-5343929353

   🤖 Arrow criterion benchmark completed (GKE) | [trigger](https://github.com/apache/arrow-rs/pull/10634#issuecomment-5343876180)
   
   **Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB)
   
   Comparing perf/arrow-string-substring-vecs (a35d3fe0b73189246cd9e1ec467a8d942b1d44b0) to 7ec3f5a (merge-base) [diff](https://github.com/apache/arrow-rs/compare/7ec3f5ab0c41f10ece65d3745b989ddde510539b..a35d3fe0b73189246cd9e1ec467a8d942b1d44b0)
   
   <details><summary>Run configuration</summary>
   
   ```yaml
   run benchmark substring_kernels
   env:
     BENCH_FILTER: "char"
   ```
   
   </details>
   
   <details><summary>CPU Details (lscpu)</summary>
   
   ```
   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>
   
   <details><summary>Details</summary>
   <p>
   
   ```
   group                                    main                                   perf_arrow-string-substring-vecs
   -----                                    ----                                   --------------------------------
   substring by char (ascii, prefix)        1.00      4.0±0.07ms        ? ?/sec    1.05      4.2±0.42ms        ? ?/sec
   substring by char (ascii, tail)          1.01      4.4±0.37ms        ? ?/sec    1.00      4.3±0.50ms        ? ?/sec
   substring by char (non-ascii, prefix)    1.00   1492.8±8.39µs        ? ?/sec    1.01   1506.4±6.26µs        ? ?/sec
   substring by char (non-ascii, tail)      1.05  1737.0±80.07µs        ? ?/sec    1.00  1649.9±141.08µs        ? ?/sec
   substring utf8 by char                   1.00     25.0±0.45ms        ? ?/sec    1.08     27.1±0.60ms        ? ?/sec
   ```
   
   </p>
   </details>
   
   <details><summary>Resource Usage</summary>
   
   **base (merge-base)**
   | Metric | Value |
   |--------|-------|
   | Wall time | 55.0s |
   | Peak memory | 264.8 MiB |
   | Avg memory | 192.9 MiB |
   | CPU user | 44.4s |
   | CPU sys | 6.5s |
   | Peak spill | 0 B |
   
   **branch**
   | Metric | Value |
   |--------|-------|
   | Wall time | 55.0s |
   | Peak memory | 272.5 MiB |
   | Avg memory | 205.3 MiB |
   | CPU user | 44.4s |
   | CPU sys | 7.6s |
   | Peak spill | 0 B |
   </details>
   
   
   ---
   [File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Replace substring BufferBuilders with Vec [arrow-rs]

Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #10634:
URL: https://github.com/apache/arrow-rs/pull/10634#issuecomment-5343805934

   🤖 Arrow criterion benchmark running (GKE) | [trigger](https://github.com/apache/arrow-rs/pull/10634#issuecomment-5343765499)
   **Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB) | `Linux bench-c5343765499-1756-c9mb8 6.12.85+ #1 SMP Wed Jun 17 20:31:55 UTC 2026 aarch64 GNU/Linux`
   <details><summary>CPU Details (lscpu)</summary>
   
   ```
   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>
   
   Comparing perf/arrow-string-substring-vecs (a35d3fe0b73189246cd9e1ec467a8d942b1d44b0) to 7ec3f5a (merge-base) [diff](https://github.com/apache/arrow-rs/compare/7ec3f5ab0c41f10ece65d3745b989ddde510539b..a35d3fe0b73189246cd9e1ec467a8d942b1d44b0)
   
   <details><summary>Run configuration</summary>
   
   ```yaml
   run benchmark substring_kernels
   ```
   
   </details>
   
   BENCH_COMMAND=cargo bench --features=arrow,async,test_common,experimental,object_store --bench substring_kernels
   Results will be posted here when complete
   
   ---
   [File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org