VTL regular names are now case-insensitive#861
Open
albertohernandez1995 wants to merge 8 commits into
Open
Conversation
2 tasks
…e-effect' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> Signed-off-by: Alberto <155883871+albertohernandez1995@users.noreply.github.com>
mla2001
reviewed
Jun 24, 2026
mla2001
left a comment
Contributor
There was a problem hiding this comment.
Looks fine!
It would only be necessary to add a few more VTL tests and verify that the case insensitive behavior of the operands actually works in a normal VTL run, not just check that the dictionary works.
Contributor
Author
It should be now fine. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
VTL regular names are case-insensitive per the spec, but the engine was treating
them case-sensitively — so
DS_r <- ds_1;orDS_1[filter ME_1 > 15]would blowup during semantic analysis even though
DS_1/Me_1existed. This makes regularnames (datasets, components, scalars, UDOs, hierarchical/datapoint rulesets, value
domains, external routines) resolve case-insensitively across the whole pipeline,
while keeping the casing the user actually wrote in the output.
The core of it is a small
CaseInsensitiveDict(matches keys case-insensitively butpreserves the original casing for display) backing the symbol tables and
Dataset.components, plus sharednormalize_name/names_equalhelpers for theremaining name comparisons. It's wired through both the interpreter (structure
inference) and the DuckDB transpiler (execution), the DAG analyzer, and input
loading. At the API boundary we convert back to plain dicts so the internal type
never leaks to callers or SDMX output.
"Written casing wins" for clauses:
DS_1[calc ME_1 := Me_1 * 2]produces a singleME_1column, andrename/aggrbehave the same way.Fixes #633
Checklist
ruff format,ruff check,mypy)pytest)Impact / Risk
names differing only in case are now the same name — e.g. using
Aandaastwo separate datasets is no longer allowed (that's the intended spec behavior).
One DAG test fixture was updated to reflect this.
and the API returns plain dicts as before.
Notes
Making them spec-exact (case-sensitive) would mean threading a "quoted" flag
through the parser and all lookups — deferred as a follow-up since it's out of
scope for VTL regular names must be case insensitive #633.