Skip to content

Update repeat UDF to emit utf8view when input is utf8view#20645

Merged
alamb merged 10 commits intoapache:mainfrom
Omega359:repeat_utf8view
Mar 31, 2026
Merged

Update repeat UDF to emit utf8view when input is utf8view#20645
alamb merged 10 commits intoapache:mainfrom
Omega359:repeat_utf8view

Conversation

@Omega359
Copy link
Copy Markdown
Contributor

@Omega359 Omega359 commented Mar 2, 2026

Which issue does this PR close?

Part of #20585

Rationale for this change

Functions ideally should emit strings in the same format as the input and previously the repeat function was emitting using utf8 for input that was in utf8view.

What changes are included in this PR?

Code, tests

Are these changes tested?

Yes

Are there any user-facing changes?

@github-actions github-actions bot added sqllogictest SQL Logic Tests (.slt) functions Changes to functions implementation labels Mar 2, 2026
@Omega359 Omega359 marked this pull request as ready for review March 2, 2026 16:40
@alamb
Copy link
Copy Markdown
Contributor

alamb commented Mar 28, 2026

run benchmark repeat

Copy link
Copy Markdown
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me -- thank you @Omega359

@adriangbot
Copy link
Copy Markdown

🤖 Criterion benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4147833054-596-nsqpr 6.12.55+ #1 SMP Sun Feb 1 08:59:41 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 repeat_utf8view (2bbc3ad) to 9b726bc (merge-base) diff
BENCH_NAME=repeat
BENCH_COMMAND=cargo bench --features=parquet --bench repeat
BENCH_FILTER=
Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot
Copy link
Copy Markdown

🤖 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                                   repeat_utf8view
-----                                                                                  ----                                   ---------------
repeat 1073741824 times/repeat_string overflow [size=1024, repeat_times=1073741824]    1.00    730.2±0.39ns        ? ?/sec    1.06    775.4±1.16ns        ? ?/sec
repeat 1073741824 times/repeat_string overflow [size=4096, repeat_times=1073741824]    1.01    767.8±1.52ns        ? ?/sec    1.00    757.5±0.75ns        ? ?/sec
repeat 3 times/repeat_large_string [size=1024, repeat_times=3]                         1.02     16.0±0.04µs        ? ?/sec    1.00     15.7±0.01µs        ? ?/sec
repeat 3 times/repeat_large_string [size=4096, repeat_times=3]                         1.05     62.2±0.19µs        ? ?/sec    1.00     59.4±0.09µs        ? ?/sec
repeat 3 times/repeat_string [size=1024, repeat_times=3]                               1.04     16.5±0.10µs        ? ?/sec    1.00     15.9±0.03µs        ? ?/sec
repeat 3 times/repeat_string [size=4096, repeat_times=3]                               1.04     63.5±0.38µs        ? ?/sec    1.00     60.9±0.05µs        ? ?/sec
repeat 3 times/repeat_string_view [size=1024, repeat_times=3]                          1.00     17.3±0.12µs        ? ?/sec    1.08     18.7±0.01µs        ? ?/sec
repeat 3 times/repeat_string_view [size=4096, repeat_times=3]                          1.00     66.7±0.60µs        ? ?/sec    1.08     71.9±0.13µs        ? ?/sec
repeat 30 times/repeat_large_string [size=1024, repeat_times=30]                       1.02     53.1±0.08µs        ? ?/sec    1.00     51.8±0.03µs        ? ?/sec
repeat 30 times/repeat_large_string [size=4096, repeat_times=30]                       1.02    241.7±0.87µs        ? ?/sec    1.00    237.2±0.52µs        ? ?/sec
repeat 30 times/repeat_string [size=1024, repeat_times=30]                             1.02     52.4±0.15µs        ? ?/sec    1.00     51.5±0.27µs        ? ?/sec
repeat 30 times/repeat_string [size=4096, repeat_times=30]                             1.05    247.6±0.24µs        ? ?/sec    1.00    236.6±1.07µs        ? ?/sec
repeat 30 times/repeat_string_view [size=1024, repeat_times=30]                        1.00     54.3±0.23µs        ? ?/sec    1.01     54.8±0.09µs        ? ?/sec
repeat 30 times/repeat_string_view [size=4096, repeat_times=30]                        1.00    237.5±0.32µs        ? ?/sec    1.03    245.2±0.57µs        ? ?/sec
repeat/scalar_utf8                                                                     1.00    127.2±1.09ns        ? ?/sec    1.02    130.1±2.14ns        ? ?/sec
repeat/scalar_utf8view                                                                 1.00    126.0±1.14ns        ? ?/sec    1.02    129.1±2.22ns        ? ?/sec

Resource Usage

base (merge-base)

Metric Value
Wall time 217.7s
Peak memory 3.7 GiB
Avg memory 3.7 GiB
CPU user 244.3s
CPU sys 0.9s
Disk read 0 B
Disk write 515.8 MiB

branch

Metric Value
Wall time 216.8s
Peak memory 3.7 GiB
Avg memory 3.7 GiB
CPU user 245.8s
CPU sys 0.3s
Disk read 0 B
Disk write 5.1 MiB

File an issue against this benchmark runner

@alamb alamb added this pull request to the merge queue Mar 31, 2026
@alamb
Copy link
Copy Markdown
Contributor

alamb commented Mar 31, 2026

Thanks again @Omega359

Merged via the queue into apache:main with commit 9de1253 Mar 31, 2026
52 of 53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

functions Changes to functions implementation sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants