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

Open
#721 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@MikeNitsenko is already working on this.

Since Nov 12, 2026.

  • #722 by @MikeNitsenko — open

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python, yaml
Domain
backend, data

Research direction

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.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Python
Stars
2.7k
Forks
353
Avg merge
3d 19h
Merged PRs (30d)
86

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/ossie

All issues in apache/ossie

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.