Skip to content

Fix BYTES primary key columns in dimension tables can never be looked up - #19249

Open
waterWang wants to merge 2 commits into
apache:masterfrom
waterWang:fix/bytes-primary-key-dimension-table
Open

Fix BYTES primary key columns in dimension tables can never be looked up#19249
waterWang wants to merge 2 commits into
apache:masterfrom
waterWang:fix/bytes-primary-key-dimension-table

Conversation

@waterWang

Copy link
Copy Markdown

Fix a bug where dimension tables with a BYTES primary key column can never be looked up.

Root cause: DimensionTableDataManager stores raw byte[] in the Object[] key array, but byte[] inherits identity-based hashCode/equals from Object. The probe side (LookupTransformFunction) correctly wraps the value in ByteArray (content-based), but it never matches the stored byte[].

Fix: Wrap byte[] values as ByteArray in both createFastLookupDimensionTable and the memory-optimized path, so the stored key has content-based equality.

Fixes #19228

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BYTES primary key columns in dimension tables can never be looked up

1 participant