validation: field reference resolution is case-insensitive but name uniqueness is case-sensitive

Aperta
#721 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@MikeNitsenko ci sta già lavorando.

Dal 12/11/2026.

  • #722 di @MikeNitsenko — aperta

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
python, yaml
Ambito
backend, data

Direzione di ricerca

Read validation/validate.py, especially dataset_field_names() and validate_unique_names(), then compare their behavior with the Name Resolution section in spec.md and identifier rules in expression_language.md. Decide whether declared field names should be unique case-insensitively or references should resolve by exact case, and align the specification and validator. Check the open pull request #722 before starting; done means the chosen rule is documented and consistently validated.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

needs-triage

Problem

validation/validate.py resolves dataset field references case-insensitively,
but checks name uniqueness case-sensitively, so a dataset can declare two
fields that differ only by case and produce ambiguous references.

  • dataset_field_names() case-folds declared field names (name.casefold()),
    so primary_key, unique_keys, and relationship from_columns /
    to_columns match fields ignoring case.
  • validate_unique_names() runs find_duplicates() on the raw name
    strings, so id and ID are treated as distinct fields.

A dataset declaring fields id and ID therefore passes uniqueness
validation, yet primary_key: [id] (or [ID]) resolves into a case-folded
set where both collapse to the same entry — the reference cannot tell which
field was meant.

Question

Should the spec/validator make field-name uniqueness case-insensitive (reject
id + ID as duplicates), or should reference resolution be exact-case?
spec.md's Name Resolution section doesn't state the case rules for declared
names; expression_language.md says regular identifiers are case-insensitive,
but it's unclear whether that applies to YAML-declared field names used as
key/join references.

We hit this while aligning a downstream validator with the #486 name-resolution
rules: we mirror the upstream behavior (case-insensitive resolution,
case-sensitive uniqueness) and would rather fix the ambiguity upstream than
diverge from the reference validator.

Lingua principale
Python
Stelle
2.7k
Fork
353
Merge medio
3g 19h
PR unite (30g)
86

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/ossie

Tutte le issue di apache/ossie

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.