Skip to content
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

[CORE] Remove an extra argument of make_decimal function #3754

Merged
merged 2 commits into from
Nov 24, 2023

Conversation

rui-mo
Copy link
Contributor

@rui-mo rui-mo commented Nov 16, 2023

What changes were proposed in this pull request?

Remove the extra argument toTypeNodes from make_decimal function.

How was this patch tested?

Verified on Jenkins.

@rui-mo rui-mo changed the title Integrate with Velox make_decimal function [VL] Integrate with Velox make_decimal function Nov 16, 2023
Copy link

Thanks for opening a pull request!

Could you open an issue for this pull request on Github Issues?

https://github.com/oap-project/gluten/issues

Then could you also rename commit message and pull request title in the following format?

[GLUTEN-${ISSUES_ID}][COMPONENT]feat/fix: ${detailed message}

See also:

Copy link

Run Gluten Clickhouse CI

@rui-mo rui-mo added the pending velox rebase the patch will be merged after velox rebased with Meta main branch label Nov 20, 2023
Copy link

Run Gluten Clickhouse CI

Copy link

Run Gluten Clickhouse CI

@rui-mo rui-mo requested a review from JkSelf November 21, 2023 00:38
val expressionNodes =
Lists.newArrayList(childNode, toTypeNodes, new BooleanLiteralNode(original.nullOnOverflow))
Lists.newArrayList(childNode, new BooleanLiteralNode(original.nullOnOverflow))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zzcclp Is toTypeNodes needed for CH backend?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@loneylee please help to check this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not need, but the function parameters have been changed, and the ch backend needs to update too.

    else if (function_name == "make_decimal")
    {
        if (args.size() < 3)
            throw Exception(ErrorCodes::BAD_ARGUMENTS, "make_decimal function requires at least 3 args.");
        ch_function_name = SCALAR_FUNCTIONS.at(function_name);
        auto null_on_overflow = args.at(2).value().literal().boolean();
        if (null_on_overflow)
            ch_function_name = ch_function_name + "OrNull";
    }

CI test is passed. Maybe ut is not open. I will commit a pr to fix it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@loneylee Modified in this PR. Could you help review? Thanks.

JkSelf
JkSelf previously approved these changes Nov 21, 2023
Copy link
Contributor

@JkSelf JkSelf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks.

Copy link

Run Gluten Clickhouse CI

Copy link

Run Gluten Clickhouse CI

Copy link

Run Gluten Clickhouse CI

@rui-mo rui-mo changed the title [VL] Integrate with Velox make_decimal function [CORE] Remove an extra argument of make_decimal function Nov 22, 2023
@rui-mo rui-mo requested a review from JkSelf November 23, 2023 02:29
Copy link
Contributor

@JkSelf JkSelf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@rui-mo
Copy link
Contributor Author

rui-mo commented Nov 24, 2023

@loneylee @JkSelf Thanks.

@rui-mo rui-mo merged commit c96d438 into apache:main Nov 24, 2023
19 checks passed
@GlutenPerfBot
Copy link
Contributor

===== Performance report for TPCH SF2000 with Velox backend, for reference only ====

query log/native_3754_time.csv log/native_master_11_23_2023_df3eb372c_time.csv difference percentage
q1 34.30 34.09 -0.207 99.40%
q2 22.62 24.43 1.811 108.01%
q3 38.61 37.11 -1.504 96.10%
q4 36.29 35.49 -0.802 97.79%
q5 70.27 70.74 0.467 100.66%
q6 7.32 6.77 -0.553 92.44%
q7 83.44 85.18 1.742 102.09%
q8 85.03 84.73 -0.301 99.65%
q9 125.07 118.73 -6.337 94.93%
q10 45.03 43.59 -1.438 96.81%
q11 19.96 19.61 -0.349 98.25%
q12 24.24 23.77 -0.473 98.05%
q13 46.51 45.78 -0.735 98.42%
q14 16.93 17.52 0.588 103.47%
q15 27.44 28.14 0.693 102.53%
q16 15.65 15.14 -0.508 96.76%
q17 99.40 100.38 0.982 100.99%
q18 146.37 147.08 0.709 100.48%
q19 12.83 12.95 0.124 100.97%
q20 27.17 28.07 0.906 103.33%
q21 221.46 218.99 -2.465 98.89%
q22 12.79 12.93 0.143 101.12%
total 1218.74 1211.23 -7.509 99.38%

@zhztheplayer
Copy link
Member

This fixed TPC-DS q78's fallback on hash aggregation. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending velox rebase the patch will be merged after velox rebased with Meta main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants