feat: finalize implementation of Atomic Type System, add support for missing constraining and fundamental facets#1409
Merged
Conversation
Test Results (qt3tests)RumbleDB, XQuery parser
RumbleDB, JSONiq parser
|
Test Results (qt3tests)RumbleDB, XQuery parser
RumbleDB, JSONiq parser
|
Test Results (qt3tests)RumbleDB, XQuery parser
RumbleDB, JSONiq parser
|
Test Results (qt3tests)RumbleDB, XQuery parser
RumbleDB, JSONiq parser
|
Test Results (qt3tests)RumbleDB, XQuery parser
RumbleDB, JSONiq parser
|
Test Results (qt3tests)RumbleDB, XQuery parser
RumbleDB, JSONiq parser
|
…ic values, with proper casting rules
Test Results (qt3tests)RumbleDB, XQuery parser
RumbleDB, JSONiq parser
|
Test Results (qt3tests)RumbleDB, XQuery parser
RumbleDB, JSONiq parser
|
…eral comparisons with explicit casting rules
Test Results (qt3tests)RumbleDB, XQuery parser
RumbleDB, JSONiq parser
|
Test Results (qt3tests)RumbleDB, XQuery parser
RumbleDB, JSONiq parser
|
…ndling in CastableIterator
Test Results (qt3tests)RumbleDB, XQuery parser
RumbleDB, JSONiq parser
|
Test Results (qt3tests)RumbleDB, XQuery parser
RumbleDB, JSONiq parser
|
…n CodepointsToStringFunctionIterator
Test Results (qt3tests)RumbleDB, XQuery parser
RumbleDB, JSONiq parser
|
Test Results (qt3tests)RumbleDB, XQuery parser
RumbleDB, JSONiq parser
|
ghislainfourny
requested changes
Mar 17, 2026
ghislainfourny
left a comment
Member
There was a problem hiding this comment.
Great job, @EPMatt !
Would it be possible to put the changes to CodepointsToStringFunctionIterator in another PR, to make sure this does not interfere with Henrik's work, and have him review them? Thanks!
Test Results (qt3tests)RumbleDB, XQuery parser
RumbleDB, JSONiq parser
|
…ints-to-string-iterator Restore CodepointsToStringFunctionIterator and RumbleRuntimeConfiguration to match github/master so XML/codepoint validation ships in a separate PR. Made-with: Cursor
Test Results (qt3tests)RumbleDB, XQuery parser
RumbleDB, JSONiq parser
|
EPMatt
commented
Mar 21, 2026
EPMatt
left a comment
Collaborator
Author
There was a problem hiding this comment.
@ghislainfourny changes to the CodepointsToStringFunctionIterator have been extracted to #1422. From my side, this PR is ready to merge.
ghislainfourny
approved these changes
Mar 25, 2026
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.
Overview
This PR builds on top of the existing XML node-type system and focuses on refining the atomic type system, casting semantics, and related runtime behavior. It introduces
xs:untypedAtomicsupport and a facet-aware atomic type lattice, rewrites casting and castability around a spec-aligned matrix, and adjusts runtime iterators, updates, and tests all interacts consistently with the richer type system.Changelog
Atomic type system and facet-aware casting
BuiltinTypesCatalogueto define primitive and derived atomic types with explicit fundamental facets and constraining facets, including pattern and whitespace facets for many built-ins (for example numeric types,xs:double, duration types, hex/binary).xs:untypedAtomicand updated related item and type classes (UntypedAtomicItem,AtomicItemType,ItemTypeFactory) accordingly.anyAtomicType,NOTATION, and union types).CastIterator,CastableIterator,TypePromotionIterator, andTreatIteratorto:ComparisonVisitor,ComparisonIterator,NodeComparisonRuntimeIterator) to normalizexs:untypedAtomicand respect the new casting rules in general comparisons.ErrorCodeand a wide range of exception classes (for exampleCannotAtomizeException,NodeAndNonNodeException, XML-constructor-specific exceptions) to return more precise and spec-aligned errors.ValidateTypeIterator,DynamicItemTypeIterator) to use the new type system, including better lax-mode behavior and null handling.Runtime, FLWOR, and Spark integration
RuntimeIterator,HybridRuntimeIterator, various FLWOR clause iterators) to:Tests and build configuration
xs:untypedAtomic.