Skip to content

fix: reject duplicate field names during CSV and Parquet schema inference - #24387

Merged
alamb merged 4 commits into
apache:mainfrom
sovsparrow:fix/duplicate-field-name-inference
Aug 20, 2026
Merged

alamb merged 4 commits into
apache:mainfrom
sovsparrow:fix/duplicate-field-name-inference

Conversation

@sovsparrow

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

When a Parquet file has multiple columns with the same name and compatible types, DataFusion merges them during schema inference. The scan succeeds without warning but returns only one of those columns.

PyArrow can produce such a file via its public API:

left  = pa.table({"id": [1, 2, 3], "value": [10, 20, 30]})
right = pa.table({"id": [1, 2, 3], "value": [100, 200, 300]})
joined = left.join(right, keys="id")   # left_suffix/right_suffix default to None
pq.write_table(joined, path)           # writes id, value, value

DataFusion 54.0.0 returns ['id', 'value'] for this file; the [100, 200, 300] column is missing.

Other readers either preserve the data or reject the file:

Reader Result
pyarrow ParquetFile.read() keeps all three columns
pyarrow pq.read_table() ArrowInvalid: Multiple matches for FieldRef.Name(value)
pyarrow dataset ArrowInvalid: Can't unify schema with duplicate field names
duckdb keeps all three, renames the second to value_1
polars DuplicateError
datafusion succeeds, missing column(s)

The same bug is behind two issues #24381 and #12852. CSV and Parquet schema inference both pass each file's schema to Schema::try_merge, which matches fields by name. Duplicate names in one file are merged before the scan. Thus, column(s) disappear silently.

What changes are included in this PR?

This PR adds ensure_unique_field_names to datafusion-datasource. It is called for each inferred CSV and Parquet schema before the merge. It uses the existing SchemaError::DuplicateUnqualifiedField error and adds the file location to the message.

Duplicate names are rejected. The PR does not rename columns or change how fields with unique names are merged across files.

Are these changes tested?

Yes. Two regression tests in order to cover the CSV and Parquet paths:

  • datafusion/core/src/datasource/file_format/parquet.rs — infer_schema_rejects_duplicate_field_names
  • datafusion/core/src/datasource/file_format/csv.rs — infer_schema_rejects_duplicate_header_names

Both tests create their inputs in a temporary directory; no fixtures are added. Both fail on main and pass with this change. On main, the CSV test infers Schema { fields: [id, value] } from a three-column header, matching the behavior reported in #12852.

Are there any user-facing changes?

Yes. CSV and Parquet schema inference now returns a clear error when an inferred
file schema repeats a field name. The error names the file and the repeated
column instead of returning an incomplete schema.

@Jefffrey Jefffrey left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this makes sense to me; i hope its a niche enough bug to not cause too much issues for downstream users now that itll error, though i suppose the other solution of renaming the duplicates would be breaking too anyway

@codecov-commenter

codecov-commenter commented Aug 16, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.20290% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.30%. Comparing base (dbdc627) to head (712bcea).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
datafusion/core/src/datasource/file_format/csv.rs 89.47% 0 Missing and 2 partials ⚠️
...afusion/core/src/datasource/file_format/parquet.rs 91.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #24387      +/-   ##
==========================================
- Coverage   81.31%   81.30%   -0.01%     
==========================================
  Files        1117     1117              
  Lines      395911   395980      +69     
  Branches   395911   395980      +69     
==========================================
+ Hits       321918   321969      +51     
- Misses      55177    55185       +8     
- Partials    18816    18826      +10     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sovsparrow

Copy link
Copy Markdown
Contributor Author

Yep, that was my reasoning too. This seemed safer than renaming the duplicates, and silently dropping columns is the worst option imo. In the case of downstream issues, I’d be cool with following up. Ty.

/// [`Schema::try_merge`] coalesces fields by name, so callers validate each
/// inferred file schema before merging.
pub fn ensure_unique_field_names(schema: &Schema) -> Result<()> {
let mut seen = HashSet::with_capacity(schema.fields().len());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this is going to make a hashset for schema, -- maybe can we instead reuse the same hash table?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done (cbdd34f). CSV and Parquet now reuse the same HashSet across the schemas in one inference call. It gets cleared between schemas and keeps the allocation. I also kept the CSV paths borrowed, so this doesn't add a path clone per file.

@alamb alamb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you for this @sovsparrow and @Jefffrey

It would be better I think to have an end to end toest (aka a slt test that reads a csv file with duplicate column names) to make sure this is hooked up end to end correctly

Is there any chance we can add that too?

@alamb alamb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you for this @sovsparrow and @Jefffrey

It would be better I think to have an end to end toest (aka a slt test that reads a csv file with duplicate column names) to make sure this is hooked up end to end correctly

Is there any chance we can add that too?

@alamb

alamb commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

run benchmark sql_planner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c5349842082-1782-4ksvz 6.12.85+ #1 SMP Wed Jun 17 20:31:55 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/duplicate-field-name-inference (9d30ff9) to 47e4765 (merge-base) diff

Run configuration
run benchmark sql_planner

Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

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

Comparing fix/duplicate-field-name-inference (9d30ff9) to 47e4765 (merge-base) diff

Run configuration
run benchmark sql_planner
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                                                 HEAD                                    fix_duplicate-field-name-inference
-----                                                 ----                                    ----------------------------------
logical_aggregate_with_join                           1.00    457.5±1.59µs        ? ?/sec     1.01    459.9±1.92µs        ? ?/sec
logical_correlated_subquery_exists                    1.01    288.3±1.15µs        ? ?/sec     1.00    285.8±0.92µs        ? ?/sec
logical_correlated_subquery_in                        1.00    288.6±0.88µs        ? ?/sec     1.00    289.7±1.12µs        ? ?/sec
logical_distinct_many_columns                         1.00    571.4±1.08µs        ? ?/sec     1.00    572.8±1.70µs        ? ?/sec
logical_join_4_with_agg_and_filter                    1.00    256.7±1.93µs        ? ?/sec     1.00    256.2±1.60µs        ? ?/sec
logical_join_8_with_agg_sort_limit                    1.02    429.2±2.20µs        ? ?/sec     1.00    421.9±2.25µs        ? ?/sec
logical_join_chain_16                                 1.01    678.8±3.73µs        ? ?/sec     1.00    669.2±3.20µs        ? ?/sec
logical_join_chain_4                                  1.00    121.7±0.63µs        ? ?/sec     1.01    122.9±0.71µs        ? ?/sec
logical_join_chain_8                                  1.01    250.4±1.80µs        ? ?/sec     1.00    248.8±1.20µs        ? ?/sec
logical_multiple_subqueries                           1.00    527.6±2.28µs        ? ?/sec     1.00    525.6±2.17µs        ? ?/sec
logical_nested_cte_4_levels                           1.00    266.2±1.26µs        ? ?/sec     1.01    268.1±1.15µs        ? ?/sec
logical_plan_struct_join_agg_sort                     1.00    182.3±1.53µs        ? ?/sec     1.02    185.9±1.40µs        ? ?/sec
logical_plan_tpcds_all                                1.01     95.9±1.94ms        ? ?/sec     1.00     95.1±0.79ms        ? ?/sec
logical_plan_tpch_all                                 1.00      6.8±0.03ms        ? ?/sec     1.01      6.8±0.04ms        ? ?/sec
logical_scalar_subquery                               1.00    311.4±1.61µs        ? ?/sec     1.01    314.1±1.37µs        ? ?/sec
logical_select_all_from_1000                          1.00    103.9±0.14ms        ? ?/sec     1.01    104.5±0.23ms        ? ?/sec
logical_select_one_from_700                           1.00    327.1±1.46µs        ? ?/sec     1.00    326.5±1.53µs        ? ?/sec
logical_trivial_join_high_numbered_columns            1.00    288.4±0.76µs        ? ?/sec     1.00    287.5±0.81µs        ? ?/sec
logical_trivial_join_low_numbered_columns             1.00    275.3±0.66µs        ? ?/sec     1.00    276.2±0.88µs        ? ?/sec
logical_union_4_branches                              1.00    424.6±0.97µs        ? ?/sec     1.00    426.3±1.73µs        ? ?/sec
logical_union_8_branches                              1.00    808.6±2.10µs        ? ?/sec     1.01    813.1±2.49µs        ? ?/sec
logical_wide_aggregate_100_exprs                      1.00      4.5±0.01ms        ? ?/sec     1.01      4.5±0.03ms        ? ?/sec
logical_wide_case_50_exprs                            1.03      2.4±0.03ms        ? ?/sec     1.00      2.4±0.00ms        ? ?/sec
logical_wide_filter_200_predicates                    1.00   1326.5±9.56µs        ? ?/sec     1.00   1332.5±8.23µs        ? ?/sec
logical_wide_filter_50_predicates                     1.01    398.6±2.96µs        ? ?/sec     1.00    395.4±2.03µs        ? ?/sec
optimizer_correlated_exists                           1.00    245.3±0.39µs        ? ?/sec     1.00    245.3±0.78µs        ? ?/sec
optimizer_join_4_with_agg_filter                      1.00    456.8±1.29µs        ? ?/sec     1.02    463.7±1.25µs        ? ?/sec
optimizer_join_chain_4                                1.00    179.3±0.26µs        ? ?/sec     1.01    181.7±0.54µs        ? ?/sec
optimizer_join_chain_8                                1.00    563.7±0.95µs        ? ?/sec     1.00    561.4±1.19µs        ? ?/sec
optimizer_select_all_from_1000                        1.00      6.9±0.03ms        ? ?/sec     1.00      6.8±0.02ms        ? ?/sec
optimizer_select_one_from_700                         1.00    257.9±0.49µs        ? ?/sec     1.00    258.4±0.61µs        ? ?/sec
optimizer_tpcds_all                                   1.01    312.7±5.59ms        ? ?/sec     1.00    310.7±2.82ms        ? ?/sec
optimizer_tpch_all                                    1.00     17.0±0.03ms        ? ?/sec     1.03     17.6±0.34ms        ? ?/sec
optimizer_wide_aggregate_100                          1.00      2.3±0.01ms        ? ?/sec     1.00      2.3±0.00ms        ? ?/sec
optimizer_wide_filter_200                             1.01      3.7±0.05ms        ? ?/sec     1.00      3.7±0.02ms        ? ?/sec
physical_intersection                                 1.00    603.6±1.83µs        ? ?/sec     1.00    604.8±1.37µs        ? ?/sec
physical_join_consider_sort                           1.00   1048.9±4.17µs        ? ?/sec     1.02  1072.9±17.55µs        ? ?/sec
physical_join_distinct                                1.00    267.5±0.74µs        ? ?/sec     1.00    267.7±0.98µs        ? ?/sec
physical_many_self_joins                              1.00      7.7±0.06ms        ? ?/sec     1.01      7.7±0.08ms        ? ?/sec
physical_plan_clickbench_all                          1.01    131.4±5.14ms        ? ?/sec     1.00    129.6±0.48ms        ? ?/sec
physical_plan_clickbench_q1                           1.11  1556.3±117.71µs        ? ?/sec    1.00  1402.8±24.92µs        ? ?/sec
physical_plan_clickbench_q10                          1.00      2.1±0.01ms        ? ?/sec     1.03      2.1±0.14ms        ? ?/sec
physical_plan_clickbench_q11                          1.20      2.8±0.07ms        ? ?/sec     1.00      2.3±0.11ms        ? ?/sec
physical_plan_clickbench_q12                          1.02      2.4±0.17ms        ? ?/sec     1.00      2.4±0.01ms        ? ?/sec
physical_plan_clickbench_q13                          1.00      2.1±0.02ms        ? ?/sec     1.01      2.1±0.01ms        ? ?/sec
physical_plan_clickbench_q14                          1.00      2.3±0.11ms        ? ?/sec     1.00      2.3±0.08ms        ? ?/sec
physical_plan_clickbench_q15                          1.00      2.2±0.14ms        ? ?/sec     1.05      2.3±0.25ms        ? ?/sec
physical_plan_clickbench_q16                          1.00   1809.3±6.03µs        ? ?/sec     1.03  1869.6±90.20µs        ? ?/sec
physical_plan_clickbench_q17                          1.12      2.1±0.24ms        ? ?/sec     1.00  1912.9±78.06µs        ? ?/sec
physical_plan_clickbench_q18                          1.00  1722.8±76.65µs        ? ?/sec     1.01  1736.7±60.01µs        ? ?/sec
physical_plan_clickbench_q19                          1.02      2.2±0.12ms        ? ?/sec     1.00      2.1±0.01ms        ? ?/sec
physical_plan_clickbench_q2                           1.00  1798.3±76.04µs        ? ?/sec     1.00  1789.9±10.68µs        ? ?/sec
physical_plan_clickbench_q20                          1.00   1550.9±9.34µs        ? ?/sec     1.14  1762.1±158.20µs        ? ?/sec
physical_plan_clickbench_q21                          1.00  1778.3±25.43µs        ? ?/sec     1.03  1836.3±104.25µs        ? ?/sec
physical_plan_clickbench_q22                          1.18      2.7±0.16ms        ? ?/sec     1.00      2.3±0.16ms        ? ?/sec
physical_plan_clickbench_q23                          1.00      2.5±0.16ms        ? ?/sec     1.00      2.5±0.18ms        ? ?/sec
physical_plan_clickbench_q24                          1.00      6.7±0.18ms        ? ?/sec     1.00      6.7±0.01ms        ? ?/sec
physical_plan_clickbench_q25                          1.00  1907.0±32.39µs        ? ?/sec     1.13      2.2±0.23ms        ? ?/sec
physical_plan_clickbench_q26                          1.00  1788.0±85.90µs        ? ?/sec     1.01  1802.7±82.57µs        ? ?/sec
physical_plan_clickbench_q27                          1.05      2.1±0.21ms        ? ?/sec     1.00      2.0±0.12ms        ? ?/sec
physical_plan_clickbench_q28                          1.03      2.4±0.16ms        ? ?/sec     1.00      2.4±0.01ms        ? ?/sec
physical_plan_clickbench_q29                          1.00      2.5±0.11ms        ? ?/sec     1.00      2.5±0.01ms        ? ?/sec
physical_plan_clickbench_q3                           1.00  1692.3±58.75µs        ? ?/sec     1.04  1753.3±117.43µs        ? ?/sec
physical_plan_clickbench_q30                          1.00     15.7±0.15ms        ? ?/sec     1.01     15.9±0.41ms        ? ?/sec
physical_plan_clickbench_q31                          1.00      2.6±0.17ms        ? ?/sec     1.00      2.6±0.14ms        ? ?/sec
physical_plan_clickbench_q32                          1.03      2.6±0.24ms        ? ?/sec     1.00      2.5±0.06ms        ? ?/sec
physical_plan_clickbench_q33                          1.00      2.1±0.07ms        ? ?/sec     1.04      2.2±0.13ms        ? ?/sec
physical_plan_clickbench_q34                          1.00  1866.3±109.92µs        ? ?/sec    1.00  1867.2±52.16µs        ? ?/sec
physical_plan_clickbench_q35                          1.00  1877.5±71.47µs        ? ?/sec     1.00   1875.0±8.67µs        ? ?/sec
physical_plan_clickbench_q36                          1.00      2.2±0.13ms        ? ?/sec     1.20      2.7±0.21ms        ? ?/sec
physical_plan_clickbench_q37                          1.00      2.5±0.01ms        ? ?/sec     1.03      2.6±0.12ms        ? ?/sec
physical_plan_clickbench_q38                          1.10      3.0±0.30ms        ? ?/sec     1.00      2.7±0.19ms        ? ?/sec
physical_plan_clickbench_q39                          1.03      2.7±0.18ms        ? ?/sec     1.00      2.6±0.02ms        ? ?/sec
physical_plan_clickbench_q4                           1.00  1493.7±27.81µs        ? ?/sec     1.06  1590.0±135.98µs        ? ?/sec
physical_plan_clickbench_q40                          1.00      3.4±0.16ms        ? ?/sec     1.03      3.5±0.25ms        ? ?/sec
physical_plan_clickbench_q41                          1.00      2.9±0.03ms        ? ?/sec     1.08      3.1±0.30ms        ? ?/sec
physical_plan_clickbench_q42                          1.00      3.2±0.19ms        ? ?/sec     1.02      3.2±0.24ms        ? ?/sec
physical_plan_clickbench_q43                          1.00      3.2±0.03ms        ? ?/sec     1.05      3.3±0.23ms        ? ?/sec
physical_plan_clickbench_q44                          1.07  1726.7±157.62µs        ? ?/sec    1.00  1610.3±51.59µs        ? ?/sec
physical_plan_clickbench_q45                          1.01  1620.5±59.25µs        ? ?/sec     1.00  1600.8±11.23µs        ? ?/sec
physical_plan_clickbench_q46                          1.02  1957.6±68.24µs        ? ?/sec     1.00   1910.6±8.82µs        ? ?/sec
physical_plan_clickbench_q47                          1.00      2.6±0.01ms        ? ?/sec     1.09      2.9±0.28ms        ? ?/sec
physical_plan_clickbench_q48                          1.00      2.8±0.01ms        ? ?/sec     1.04      2.9±0.23ms        ? ?/sec
physical_plan_clickbench_q49                          1.13      3.2±0.29ms        ? ?/sec     1.00      2.9±0.01ms        ? ?/sec
physical_plan_clickbench_q5                           1.00   1612.1±6.38µs        ? ?/sec     1.02  1638.9±61.45µs        ? ?/sec
physical_plan_clickbench_q50                          1.00      2.7±0.07ms        ? ?/sec     1.04      2.8±0.19ms        ? ?/sec
physical_plan_clickbench_q51                          1.02      2.1±0.12ms        ? ?/sec     1.00      2.1±0.01ms        ? ?/sec
physical_plan_clickbench_q6                           1.11  1829.1±156.75µs        ? ?/sec    1.00  1643.5±28.90µs        ? ?/sec
physical_plan_clickbench_q7                           1.01  1460.4±55.09µs        ? ?/sec     1.00   1449.4±9.93µs        ? ?/sec
physical_plan_clickbench_q8                           1.00      2.0±0.11ms        ? ?/sec     1.01      2.0±0.15ms        ? ?/sec
physical_plan_clickbench_q9                           1.00  1979.3±67.72µs        ? ?/sec     1.13      2.2±0.22ms        ? ?/sec
physical_plan_struct_join_agg_sort                    1.00  1299.4±13.39µs        ? ?/sec     1.01   1318.8±4.03µs        ? ?/sec
physical_plan_tpcds_all                               1.00   725.9±17.62ms        ? ?/sec     1.01   731.6±19.68ms        ? ?/sec
physical_plan_tpch_all                                1.01     45.2±0.96ms        ? ?/sec     1.00     44.8±0.12ms        ? ?/sec
physical_plan_tpch_q1                                 1.00  1571.1±16.23µs        ? ?/sec     1.01   1583.2±4.54µs        ? ?/sec
physical_plan_tpch_q10                                1.00      2.9±0.09ms        ? ?/sec     1.00      2.9±0.02ms        ? ?/sec
physical_plan_tpch_q11                                1.00      2.3±0.03ms        ? ?/sec     1.02      2.3±0.06ms        ? ?/sec
physical_plan_tpch_q12                                1.00   1259.4±3.21µs        ? ?/sec     1.02   1286.4±3.03µs        ? ?/sec
physical_plan_tpch_q13                                1.00   1049.1±9.13µs        ? ?/sec     1.04  1095.0±11.91µs        ? ?/sec
physical_plan_tpch_q14                                1.00  1433.2±31.41µs        ? ?/sec     1.02  1463.8±23.63µs        ? ?/sec
physical_plan_tpch_q16                                1.00  1633.8±19.99µs        ? ?/sec     1.00  1637.9±22.00µs        ? ?/sec
physical_plan_tpch_q17                                1.02  1688.7±10.08µs        ? ?/sec     1.00  1658.0±27.18µs        ? ?/sec
physical_plan_tpch_q18                                1.00   1986.9±2.97µs        ? ?/sec     1.00  1982.0±14.29µs        ? ?/sec
physical_plan_tpch_q19                                1.00  1908.9±27.06µs        ? ?/sec     1.04  1985.2±56.52µs        ? ?/sec
physical_plan_tpch_q2                                 1.00      3.6±0.01ms        ? ?/sec     1.09      4.0±0.13ms        ? ?/sec
physical_plan_tpch_q20                                1.03      2.3±0.12ms        ? ?/sec     1.00      2.2±0.08ms        ? ?/sec
physical_plan_tpch_q21                                1.02      3.0±0.15ms        ? ?/sec     1.00      2.9±0.08ms        ? ?/sec
physical_plan_tpch_q22                                1.01  1514.1±26.19µs        ? ?/sec     1.00   1499.0±2.52µs        ? ?/sec
physical_plan_tpch_q3                                 1.04      2.0±0.08ms        ? ?/sec     1.00  1925.9±28.44µs        ? ?/sec
physical_plan_tpch_q4                                 1.00  1216.5±14.52µs        ? ?/sec     1.03  1253.4±12.12µs        ? ?/sec
physical_plan_tpch_q5                                 1.00      2.8±0.07ms        ? ?/sec     1.01      2.8±0.03ms        ? ?/sec
physical_plan_tpch_q6                                 1.00    622.9±1.75µs        ? ?/sec     1.02    635.9±1.44µs        ? ?/sec
physical_plan_tpch_q7                                 1.00      2.9±0.03ms        ? ?/sec     1.14      3.2±0.07ms        ? ?/sec
physical_plan_tpch_q8                                 1.00      3.9±0.14ms        ? ?/sec     1.02      4.0±0.13ms        ? ?/sec
physical_plan_tpch_q9                                 1.04      2.9±0.15ms        ? ?/sec     1.00      2.8±0.05ms        ? ?/sec
physical_select_aggregates_from_200                   1.00     15.4±0.05ms        ? ?/sec     1.00     15.5±0.11ms        ? ?/sec
physical_select_all_from_1000                         1.00    115.2±0.38ms        ? ?/sec     1.01    116.2±0.36ms        ? ?/sec
physical_select_one_from_700                          1.00    773.5±1.75µs        ? ?/sec     1.02   785.9±15.88µs        ? ?/sec
physical_sorted_union_order_by_10_int64               1.00      4.2±0.06ms        ? ?/sec     1.01      4.3±0.09ms        ? ?/sec
physical_sorted_union_order_by_10_uint64              1.00      9.1±0.14ms        ? ?/sec     1.00      9.1±0.09ms        ? ?/sec
physical_sorted_union_order_by_50_int64               1.00     96.0±0.76ms        ? ?/sec     1.00     95.9±1.48ms        ? ?/sec
physical_sorted_union_order_by_50_uint64              1.01    402.3±9.86ms        ? ?/sec     1.00    399.0±6.55ms        ? ?/sec
physical_theta_join_consider_sort                     1.00   1084.5±7.89µs        ? ?/sec     1.01  1097.2±15.31µs        ? ?/sec
physical_unnest_to_join                               1.00    636.2±5.06µs        ? ?/sec     1.03    657.5±6.05µs        ? ?/sec
physical_window_function_partition_by_12_on_values    1.00    718.3±1.65µs        ? ?/sec     1.01    726.0±1.87µs        ? ?/sec
physical_window_function_partition_by_30_on_values    1.00   1422.7±2.52µs        ? ?/sec     1.01   1431.0±2.38µs        ? ?/sec
physical_window_function_partition_by_4_on_values     1.00    444.9±1.60µs        ? ?/sec     1.01    449.6±2.10µs        ? ?/sec
physical_window_function_partition_by_7_on_values     1.00    542.1±1.54µs        ? ?/sec     1.01    547.8±0.94µs        ? ?/sec
physical_window_function_partition_by_8_on_values     1.00    581.1±1.09µs        ? ?/sec     1.02    590.5±1.54µs        ? ?/sec
with_param_values_many_columns                        1.00    440.4±2.41µs        ? ?/sec     1.02    448.4±6.05µs        ? ?/sec

Resource Usage

sql_planner — base (merge-base)

Metric Value
Wall time 2410.5s
Peak memory 129.8 MiB
Avg memory 66.2 MiB
CPU user 1872.0s
CPU sys 1.3s
Peak spill 0 B

sql_planner — branch

Metric Value
Wall time 2485.5s
Peak memory 130.4 MiB
Avg memory 64.7 MiB
CPU user 1891.0s
CPU sys 1.5s
Peak spill 0 B

File an issue against this benchmark runner

@github-actions github-actions Bot added the sqllogictest SQL Logic Tests (.slt) label Aug 20, 2026
@sovsparrow

Copy link
Copy Markdown
Contributor Author

@alamb I added this to csv_files.slt. It creates an external table from a small CSV with id,value,value and checks for the duplicate-field error. I also removed the validation locally once to make sure the SLT actually fails without the fix.

@sovsparrow
sovsparrow requested a review from alamb August 20, 2026 11:23

@alamb alamb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you @sovsparrow

@alamb
alamb enabled auto-merge August 20, 2026 17:42
@alamb
alamb added this pull request to the merge queue Aug 20, 2026
Merged via the queue into apache:main with commit 12ba4b7 Aug 20, 2026
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core DataFusion crate datasource Changes to the datasource crate sqllogictest SQL Logic Tests (.slt) v56.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Parquet scan silently drops one of two columns with the same name CSVReader behavior with dataset that has duplicate column headers is confusing

6 participants