delta-io/delta

fix: Java Kernel data skipping uses case-sensitive column matching

Open

#6.247 geöffnet am 11. März 2026

Auf GitHub ansehen
 (3 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Scala (2.100 Forks)batch import
buggood first issue

Repository-Metriken

Stars
 (8.807 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 7T 1h) (142 gemergte PRs in 30 T)

Beschreibung

Description

Delta column names are case-insensitive per the protocol spec ("All column names must be unique regardless of casing"). Delta Spark uses equalsIgnoreCase when resolving predicate column references against the table schema in the data skipping path (via findNestedFieldIgnoreCase).

However, Java Kernel's StatsSchemaHelper uses case-sensitive matching. The Column class uses Arrays.equals(names, other.getNames()) for equality, and the HashMap lookups in StatsSchemaHelper.getLogicalToPhysicalColumnAndDataType() are therefore case-sensitive. This means a predicate like col > 5 will fail to match a schema column named Col, and data skipping will not be applied.

Steps to reproduce

  1. Create a Delta table with a column named Value (mixed case)
  2. Query with a predicate using a differently-cased column name, e.g., value > 100
  3. Data skipping will not be applied because the column lookup fails

Expected behavior

Case-insensitive column matching in the data skipping path, consistent with Delta Spark which uses equalsIgnoreCase in findNestedFieldIgnoreCase.

Relevant code

  • kernel-api/src/main/java/io/delta/kernel/internal/skipping/StatsSchemaHelper.java — builds column maps using exact field names, HashMap lookups are case-sensitive
  • kernel/expressions/Column.javaequals() uses Arrays.equals(names, other.getNames()) (case-sensitive)

References

Contributor Guide