Repository navigation
Fix Redis dictionary with an Int256 key silently returning the default value - #117735
Conversation
|
Workflow [PR], commit [758f86a] Summary: ✅
AI ReviewSummaryThis PR narrows Redis dictionary key validation from generic integers to native integers plus Missing context / blind spots
Final Verdict
LLVM Coverage ReportMeasured on commit 758f86a.
Changed lines: Changed C/C++ lines covered: 25/25 (100.00%) · Uncovered code |
9cd449b to
cd0d038
Compare
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Slowest function optimization changes (ThinLTO)Median per-function time ratio to the master baseline:
Compile time of recompiled translation units7 translation units recompiled, 11 s compile time in total, 7 of them have a recent master baseline. |
|
@protomn merge one more time with master. |
|
@protomn you should have merged with master, we have been fixing flaky tests. |
Reproducer-- Redis: HSET 123456 x v1
CREATE DICTIONARY hm_wide (k1 Int256, k2 String, value String)
PRIMARY KEY k1, k2
SOURCE(REDIS(HOST '127.0.0.1' PORT 6379 STORAGE_TYPE 'hash_map'))
LAYOUT(COMPLEX_KEY_DIRECT());
SELECT dictGet('hm_wide', 'value', tuple(toInt256(123456), 'x'));
-- 26.6/26.7/26.8: returns '' (default). Redis receives `HMGET '123456' x` - the
-- key is quoted by FieldVisitorToString, so it never matches.
-- 26.3: throws `Unsupported type Int256` (UNKNOWN_TYPE) - no silent default.
-- master (post-#117735): throws `supports only native integer or string key`.
-- Same defect on STORAGE_TYPE 'simple' with a single Int256 key on 26.6+.Results:
Backport the fix to CC component owner: @alexey-milovidov @kssenii Analysis metadata
Introducing change: not identified
|
Closes: #117705
Related: #106501
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fix a dictionary with a Redis source and an
Int256key column silently returning thedefault value from
dictGetfor keys that exist in Redis. Wide integer key columns arenow refused with a clear error instead of being admitted and never matching.
The key screens in the constructor are tightened from
isIntegertoisNativeInteger,so all four wide integer types are refused consistently, with the same message for the
simpleandhash_mappaths. The wide-integer arm ofserialize_keybecomesunreachable and is removed along with its include.
Workflow [PR]
Sync PR [sync-upstream/pr/117735]
Version info
26.9.1.736(included in26.9and later)