Skip to content

fix(arrow-json): validate ListView child nullability - #10486

Merged
Jefffrey merged 1 commit into
apache:mainfrom
dk3yyyy:fix/10476-list-view-non-nullable-child
Jul 30, 2026
Merged

fix(arrow-json): validate ListView child nullability#10486
Jefffrey merged 1 commit into
apache:mainfrom
dk3yyyy:fix/10476-list-view-non-nullable-child

Conversation

@dk3yyyy

@dk3yyyy dk3yyyy commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

The JSON reader constructs ListView arrays without validating child nullability. As a result, JSON containing null can be accepted for a non-nullable child field.

What changes are included in this PR?

  • Replace unchecked ListView construction with GenericListViewArray::try_new, returning an ArrowError when child nullability is invalid.
  • Add regression coverage for both ListView and LargeListView.

Are these changes tested?

Yes:

  • cargo test -p arrow-json reader::tests::test_read_list_view_rejects_null_non_nullable_child -- --exact
  • cargo test -p arrow-json --all-features
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo fmt --all -- --check
  • git diff --check

Are there any user-facing changes?

Yes. Invalid JSON containing a null inside a non-nullable ListView or LargeListView child now returns an error. There is no public API change.

@github-actions github-actions Bot added the arrow Changes to the arrow crate label Jul 30, 2026
@Jefffrey

Copy link
Copy Markdown
Contributor

run benchmark json_reader
env:
BENCH_FILTER: list_view

@adriangbot

Copy link
Copy Markdown

🤖 Arrow criterion benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c5125507386-1297-fk7n8 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 fix/10476-list-view-non-nullable-child (b0ba059) to 005a2fd (merge-base) diff
BENCH_NAME=json_reader
BENCH_COMMAND=cargo bench --features=arrow,async,test_common,experimental,object_store --bench json_reader
BENCH_FILTER=list_view
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                                 fix_10476-list-view-non-nullable-child    main
-----                                 --------------------------------------    ----
decode_list_view_long_json/131072     1.00    308.8±2.14ms   253.5 MB/sec       1.00    308.2±1.75ms   254.1 MB/sec
decode_list_view_long_serialize       1.00    211.8±4.30ms        ? ?/sec       1.04    220.5±3.84ms        ? ?/sec
decode_list_view_short_json/131072    1.01     20.3±0.06ms   257.2 MB/sec       1.00     20.1±0.08ms   259.2 MB/sec
decode_list_view_short_serialize      1.00     11.7±0.17ms        ? ?/sec       1.02     12.0±0.17ms        ? ?/sec

Resource Usage

base (merge-base)

Metric Value
Wall time 70.0s
Peak memory 1.2 GiB
Avg memory 917.3 MiB
CPU user 55.4s
CPU sys 7.7s
Peak spill 0 B

branch

Metric Value
Wall time 70.0s
Peak memory 1.2 GiB
Avg memory 932.9 MiB
CPU user 56.9s
CPU sys 7.2s
Peak spill 0 B

File an issue against this benchmark runner

@Jefffrey Jefffrey added the bug label Jul 30, 2026
@Jefffrey
Jefffrey merged commit 4dc1469 into apache:main Jul 30, 2026
27 checks passed
@Jefffrey

Copy link
Copy Markdown
Contributor

thanks @dk3yyyy

@dk3yyyy
dk3yyyy deleted the fix/10476-list-view-non-nullable-child branch July 30, 2026 10:09
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 bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

json: reading nulls into listviewvalues when declared as not nullable should error

3 participants