bug: variant-length hash key uses value encoding which does not respect Eq
#9659
Labels
component/common
Common components, such as array, data chunk, expression.
type/bug
Something isn't working
Milestone
Theoretically, we should use
serialize
anddeserialize
fromtrait HashKeySerde
for the hash keys in the in-memory hash map. But for some reason, we're instead totally ignoring this and using value encoding if there's any column with a variant length (likeVARCHAR
) in the key.This is incorrect since value encoding does not respect
Eq
defined on the datum (SQL types). For example,Decimal(1.0)
vsDecimal(1.00)
orInterval(24 hour)
vsInterval(1 day)
are considered equal under theGROUP BY
context, while their value encoding values differ and represent their real value.risingwave/src/common/src/hash/key.rs
Lines 254 to 271 in 39d3ab1
To simply reproduce this bug...
The text was updated successfully, but these errors were encountered: