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

Đang mở
#721 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@MikeNitsenko đang làm issue này rồi.

Từ ngày 12/11/2026.

  • #722 của @MikeNitsenko — đang mở

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
python, yaml
Lĩnh vực
backend, data

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Python
Star
2.7k
Fork
353
Merge trung bình
3 ngày 19 giờ
Pull request đã merge (30 ngày)
86

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của apache/ossie

Tất cả issue của apache/ossie

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.