-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[feature](scalar-fn) Support gamma scalar function #60111
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
base: master
Are you sure you want to change the base?
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
zclllyybb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should add regression-test case, beut case, and fe fold-constant implementation
...core/src/main/java/org/apache/doris/nereids/rules/expression/rules/FoldConstantRuleOnFE.java
Outdated
Show resolved
Hide resolved
regression-test/suites/query_p0/sql_functions/math_functions/test_gamma.groovy
Show resolved
Hide resolved
...core/src/main/java/org/apache/doris/nereids/rules/expression/rules/FoldConstantRuleOnFE.java
Outdated
Show resolved
Hide resolved
|
Hi @zclllyybb, thanks for your review! I have addressed all your comments:
Please check it again when you have time. Thanks! |
regression-test/data/query_p0/sql_functions/math_functions/test_gamma.out
Show resolved
Hide resolved
|
run buildall |
TPC-H: Total hot run time: 31327 ms |
TPC-DS: Total hot run time: 173049 ms |
ClickBench: Total hot run time: 26.72 s |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
FE Regression Coverage ReportIncrement line coverage |
|
Hi @zclllyybb, Since my changes only involve adding a scalar math function ( Could you please help confirm whether this failure is caused by the code I added, or if it is an unrelated issue? Thanks! |
zclllyybb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I skipped it. code's good for me now. |
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
FE Regression Coverage ReportIncrement line coverage |
|
please link your docs PR in this PR content. then we can merge this. |
Problem Summary
Implemented the scalar function
gamma(x)which calculates the Gamma function.This implementation maps the SQL function
gammato the C++ standard library functionstd::tgamma.gammatostd::tgammainmath.cpp.FunctionSet.javaand implementedGamma.javafor Nereids optimizer.Checklist
SELECT gamma(5);in MySQL client.24(Correct, 4! = 24).Behavior changed:
Does this need documentation?