validation: field reference resolution is case-insensitive but name uniqueness is case-sensitive
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
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
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()),
soprimary_key,unique_keys, and relationshipfrom_columns/
to_columnsmatch fields ignoring case.validate_unique_names()runsfind_duplicates()on the rawname
strings, soidandIDare 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
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/ossie
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 52/100
Maintainers usually reply within 1 day
-
needs-triage
Difficulty 5/5 Over a week Newbie friendliness 25/100
apache/ossie#710 · 6 comments ·
Maintainers usually reply within 1 day
-
needs-triage
Difficulty 5/5 Over a week Newbie friendliness 25/100
apache/ossie#707 · 3 comments ·
Maintainers usually reply within 1 day
-
needs-triage
Difficulty 5/5 Over a week Newbie friendliness 30/100
apache/ossie#694 · 3 comments ·
Maintainers usually reply within 1 day
Similar issues
-
integration: media_player
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
home-assistant/core#193344 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
daniel-ospina/tortoise#13607 ·
Maintainers usually reply within 1 day
-
documentation priority: medium
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 66/100
Robin-IA/Congressional-Letters-Dev#1347 ·
Maintainers usually reply within 1 day