Package org.rumbledb.runtime.misc
Class AtomicValueComparison
java.lang.Object
org.rumbledb.runtime.misc.AtomicValueComparison
Atomic equivalence semantics for operations such as
distinct-values and grouping.
This uses atomic deep equality, including NaN equality. It is intentionally separate from Java
equality and map op:same-key: numeric comparison applies type promotion and is not
transitive across mixed numeric types.-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanReturns whether two atomic values belong to the same distinct/grouping equivalence class.static booleanequal(Item left, Item right, String collationUri, ExceptionMetadata metadata) static intA hash compatible with atomic value comparison.static inthash(Item item, String collationUri, ExceptionMetadata metadata)
-
Method Details
-
equal
Returns whether two atomic values belong to the same distinct/grouping equivalence class. -
equal
-
hash
A hash compatible with atomic value comparison. Numeric values are reduced to float because float is the lowest-precision promotion target: any pair equal after decimal/float/double promotion necessarily has the same float value. Gregorian and duration hashes are deliberately coarse because their comparison depends on timezone normalization or subtype promotion. -
hash
-