Repository navigation
Allow arbitrary non-nullable types as key for maps - #59318
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
|
This is an automated comment for commit c0ddd3d with description of existing statuses. It's updated for the latest CI running ❌ Click here to open a full report in a separate page
Successful checks
|
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
map key and value
rschu1ze
left a comment
There was a problem hiding this comment.
Looks generally good to me.
I made a few fix-ups locally (docs, exception message text, etc) but I don't have permission to push to your repo:
~/repo/ch (complex_map_key %>) $ git push bigo-sg complex_map_key
remote: Permission to bigo-sg/ClickHouse.git denied to rschu1ze.
fatal: unable to access 'https://github.com/bigo-sg/ClickHouse.git/': The requested URL returned error: 403
Anyways, I can push them in a separate PR once this is merged.
The msan error looks related, it is triggered by 02169_map_functions.sql, kindly check it.
Sorry to reply late. I rebuilt clickhouse with memory sanitizer locally, but it can't be reproduced. |
|
Can't be reproduced in my local environment, are they noise or I'm wrong ? @rschu1ze |
map key and valueMap can now have arbitrary non-nullable types as key
Map can now have arbitrary non-nullable types as key|
Sorry for the delay, just came back from vacation. This query crashes with this PR (can be locally using a debug build): The same failure appears here.) --> The performance failures (e.g. here) are unrelated. Do you also like to take a look here which looks related (on the surface)? https://s3.amazonaws.com/clickhouse-test-reports/59318/5f786647fbc2c54dab9cd9885dffd4bfa4eec83a/ast_fuzzer__tsan_.html The test failure of 00062_loyalty (here) looks also weird but it does not contain Please also merge once more from |
BTW, there is the same logical error in the master. Probably, it's related to the new analyzer being merged |
@rschu1ze I tried, but it could not be reproduced. |
SELECT tuple(mapSort(k -> k, map([toUInt128(4), 3, 1], materialize(toNullable(4)), [4], 5))), mapUpdate(map('k1', 1, toFixedString('k2', 2), 2), map(toFixedString('k1', 2), materialize(toLowCardinality(11)), 'k2', 22)) GROUP BY toUInt256(3), tuple(toNullable(1)), 1 WITH CUBE;does not run in SELECT tuple(mapSort(k -> k, map('a', 4))), mapUpdate(map('k1', 1), map('k2', 11)) GROUP BY 1 WITH CUBE;Opened issue #62374. There are still many analyzer-related failures :-( Let's wait a bit more until the CI situation is better. |
|
@taiyang-li Like to merge from |
I'll merge and keep an eye on the error. |
Double-checking #59318 and docs for `Map`
|
Hi @taiyang-li @rschu1ze — while reviewing this PR I found the following:
Happy to discuss — close anything that's wrong or already addressed. |

Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Maps can now have
Float32,Float64,Array(T),Map(K,V)andTuple(T1, T2, ...)as keys. Closes #54537.