refactor(cudf): Register Spark and Presto functions separately#16960
refactor(cudf): Register Spark and Presto functions separately#16960jinchengchenghh wants to merge 2 commits intofacebookincubator:mainfrom
Conversation
✅ Deploy Preview for meta-velox canceled.
|
86bd743 to
69c6a09
Compare
Build Impact AnalysisFull build recommended. Files outside the dependency graph changed:
These directories are not fully covered by the dependency graph. A full build is the safest option. Slow path • Graph generated from PR branch |
|
Hi, @devavret Do you have any suggestions? |
8b3f8ef to
85c7559
Compare
devavret
left a comment
There was a problem hiding this comment.
Some cleanups are required. Also, a companion presto PR should be merged at the same time. prestodb/presto#27540
|
|
||
| void unregisterFunctions(); | ||
|
|
||
| void unregisterFunctionsWithPrefix(const std::string& prefix); |
There was a problem hiding this comment.
I don't think this is used anywhere? using the overwrite flag with registerCudfFunction should be sufficient right?
There was a problem hiding this comment.
Removed, but please don't rely on overwrite flag, it is not reliable in many cases, such as decimal result with different scale, variant number of input arguments such as hash(x) and hash(x, y, z), argument datatype is any but not supported any.
| .argumentType("row(double,bigint)") | ||
| .build()); | ||
| } | ||
| // |
There was a problem hiding this comment.
you should move or remove this comment block
|
Yes, so as apache/gluten#11892 |
|
Do you have any further comments? @devavret |
|
It seems presto CI will only work after this PR gets merged and presto pin updated. I also think currently presto won't break because the only thing registered specially for presto is aggregation signatures which differ in return type and we don't enforce that |
|
Another PR also meets the hang, https://github.com/facebookincubator/velox/actions/runs/24341343799/job/71074538459?pr=17113, do you know the reason? @devavret |
e81abdf to
860dd33
Compare
CI Failure Analysis🟡 Expression Fuzzer with Presto SOT — FUZZER Failure View logsFuzzer crash: Instance 4 (seed=177491923) aborted. The Presto reference query runner threw an exception that Velox did not throw, causing the The root cause is a 🟡 Window Fuzzer with Presto as source of truth — FUZZER Failure View logsFuzzer crash: Instance 1 (seed=9992519) aborted. The window fuzzer's verification rate dropped below the 50% threshold due to too many Presto reference query failures (negative/null frame offsets, hugeint type not supported, etc.). The verification rate was 47.89% (just below the 50% threshold), meaning too many iterations were skipped due to Presto reference failures. Correlation with PR changes: Known issues:
Reproduce locally: # Expression Fuzzer (seed=177491923)
./_build/debug/velox/expression/fuzzer/velox_expression_fuzzer_test \
--seed 177491923 \
--enable_variadic_signatures \
--velox_fuzzer_enable_complex_types \
--lazy_vector_generation_ratio 0.2 \
--duration_sec 300 \
--logtostderr=1 --minloglevel=0
# Window Fuzzer (seed=9992519)
./_build/debug/velox/functions/prestosql/fuzzer/velox_window_fuzzer_test \
--seed 9992519 \
--duration_sec 300 \
--logtostderr=1 --minloglevel=0Note: Both fuzzers require a running Presto server for SOT comparison mode. Recommended action: No action needed from this PR. Both failures are pre-existing flaky fuzzer issues unrelated to the cuDF refactoring changes. |
|
@peterenescu has imported this pull request. If you are a Meta employee, you can view this in D100832100. |
|
@peterenescu merged this pull request in 7c8d926. |
The downstream project should register their own functions separately, only register the common functions when registering cudf.
Remove config
cudf.function_engine.For functions whose implementations are shared across engines but have different signatures or names, we should introduce a CommonFunctions.h file to host the shared definitions. Currently, no such cases exist.
Cooperated with AI IBM Bob