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
Support NULL in function transform. #40493
Conversation
40e0da0
to
049c356
Compare
Also support DateTime64 in transform. This fixes #32387 |
ce55fc3
to
3a0096a
Compare
Stress test (thread) — Sanitizer assert (in stderr.log) ==672==WARNING: invalid path to external symbolizer! It's somehow related to MergeMutate. Stress test (debug) — OOM killer (or signal 9) in clickhouse-server.log Doesn't seem related |
I guess, the main issue is "WARNING: ThreadSanitizer: data race (pid=672)" |
looks like we have almost zero perf tests for |
Done.
I don't know why llvm-symbolizer is broken and there is no evidence what's going wrong. |
a3beb9f
to
3b986b8
Compare
most significant difference is : +1.301x . Maybe it worth adding nullable specializations (doubling the code size to avoid performance degradation for not-null cases) |
fix is on the way afaiu #40608
we need to fix only the hot loops. maybe it is possible to put null-related code under |
That's what I mean by "double the code size". The hot code is a bloated template. Adding if constexpr will make it generating x2 more code |
I don't see a big issue here, since they will appear only in the single translation unit. for me the bigger concern is the source code complexity |
2ef8f3d
to
20a9995
Compare
Doesn't seem related.
Don't know what's going wrong.
Same error as before.
Don't know why. |
6b58557
to
f0b7222
Compare
This build error looks like an OOM issue. |
@nickitat Friendly ping. |
let's fix the build and make sure there is no issues with correctness and perf |
e258d9c
to
a8bf3c7
Compare
It's because without this PR the query won't work.
It's much slower because without this PR the query result is incorrect.
It's slightly slower and I think it's unrelated, because I did some local verification: Before: localhost:7000, queries 1079, QPS: 12.609, RPS: 126184662.472, MiB/s: 962.713, result RPS: 0.000, result MiB/s: 0.000. 0.000% 0.031 sec. After: localhost:7000, queries 1550, QPS: 15.328, RPS: 153392659.079, MiB/s: 1170.293, result RPS: 0.000, result MiB/s: 0.000. 0.000% 0.031 sec. |
The clang-15 ubsan build failed. I guess it's because the translation unit now becomes too large. Except that everything looks good. @nickitat Could you take another look? I don't know what's the proper way of resolving this build error and there is no error logs. |
I'm also ok with this pr as soon as CI became happy. let's be optimistic and hope that retry of the ubsan build will succeed (let's just wait). |
unfortunately looks like that only complete rerun could help |
Maybe we can add some compiler flags for |
yes, I think we could. but I would like to see the errors first. maybe you could try to build locally with ubsan and see what will happen? |
When compiling this TU, clang++ exits without any log messages after running for 15 minutes. I guess there is nothing we can do. |
maybe splitting into multiple cpp files will help. ideally would be to simplify the code somehow. |
@amosbird we still need it. |
I will try if clang 16 works |
Merging in #51351. |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Support NULL in function transform. This fixes #2655 , #9596 , #38666
This helps evaluate TPC-DS query 39 correctly.
This PR also removes most boilerplate code introduced in #31839 .
Current implementation is not ideal w.r.t performance since nullable checks are added even in not null branches. It's to avoid code bloating.There is also a proposal to implement a general version of transform #37654 . However there isn't a clear evidence that it will outperform current implementation.