Skip to content

native_datafusion: case-insensitive mode doesn't detect duplicate/ambiguous Parquet fields #3760

Closed

Description

@andygrove

Description

When running Spark SQL tests with native_datafusion scan, tests that expect errors for duplicate or ambiguous fields in case-insensitive mode fail because DataFusion's Parquet reader doesn't enforce Spark's case-sensitivity validation rules.

Affected Tests

Spark native readers should respect spark.sql.caseSensitive (FileBasedDataSourceSuite)

Writes a Parquet file with columns A, b, B, then reads with caseSensitive=false. Spark expects a SparkException when selecting b (ambiguous between b and B), but native_datafusion reads without error.

SPARK-25207: exception when duplicate fields in case-insensitive mode (ParquetFilterSuite, V1 and V2)

Writes Parquet with columns A, B, b, then reads with caseSensitive=false. Spark expects a SparkException with cause RuntimeException containing Found duplicate field(s) "B": [B, b]. The native reader either doesn't detect the duplicate, or wraps the error with a different exception type/cause than expected.

Context

PR #3687 added a fallback from native_datafusion for duplicate fields in case-insensitive mode, avoiding the test failures by falling back to the Spark reader. These tests remain ignored because the native reader itself doesn't implement the validation.

Related

Activity

  1. added 3 commits that reference this issue on Mar 22, 2026
  2. added a commit that references this issue on Mar 23, 2026
  3. vaibhawvipul commented on Mar 27, 2026

    @vaibhawvipul
    Contributor

    take

  4. vaibhawvipul commented on Mar 27, 2026

    @vaibhawvipul
    Contributor

    I would love to pick it up, if no one else is working on it.

  5. added 3 commits that reference this issue on Mar 27, 2026
    e230f6e
    04d83de
    b5297e9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions