-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add arraySymmetricDifference
function
#64414
base: master
Are you sure you want to change the base?
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
This is an automated comment for commit 87b24ff 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
|
@pheepa It is only a stylistic change but in |
@pheepa The AST fuzzer fails. Simplifying the fuzzed query gives this query: select arraySymmetricDifference([CAST('str_', 'Dynamic(max_types = 2)'), 71], [1, 2]) settings allow_experimental_dynamic_type = 1 (crash pasted below) "Dynamic" is the new dynamic and experimental data type in ClickHouse. As far as I see, During execution, I guess what we need to do is to wrap the non-dynamic column as dynamic during execution. The crash is because
|
Thank you a lot! What about code style in 7288c9f, what commit will we keep? |
Yeah, the CI makes it not too easy to find an error, and usually one needs to checkout the change, build it, and simplify issue ... |
Regarding formatting: Let's go the path of least resistance and go with your reformatting commit. |
@pheepa AST Fuzzer failed unfortunately once more (here). The simplified, offending query is:
Interestingly, the function parameters for SELECT arrayIntersect([2], [toDecimal64(0., 9)]);
-- Code: 386. DB::Exception: Received from localhost:9000. DB::Exception: There is no subtype for types UInt8, Decimal(18, 9) because some of them are numbers and some of them are not: In scope SELECT arrayIntersect([2], [toDecimal64(0., 9)]). (NO_COMMON_TYPE) Perhaps we also need to disallow Decimal inputs too? (did not check in detail) Another question: is the input data converted to the return type before comparing it? On a related note: It would be great if you could add the crashing (simplified) queries (this one and the previous one) as test cases to 03033_arraySymmetricDifference.sql. |
@rschu1ze, Thanks I think Decimal should be supported. In this case we can cast UInt8 to Decimal(18, 9), so the result type will be Decimal(18, 9)
Yes, here I will add these queries to tests, yes |
@pheepa It unfortunately looks like FastTest ran into a problem: https://s3.amazonaws.com/clickhouse-test-reports/64414/c4a0be7df4030048c58e31720f442c2f61b2141f/fast_test.html |
@pheepa Functional tests are good now (thanks). The problem is that the runtime of existing function It would be great if you could check that too! (use |
This PR re-does #62262.
Fixes #61673
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Added function
arraySymmetricDifference
Documentation entry for user-facing changes