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

[VL] Add test for log function #6211

Merged
merged 1 commit into from
Jul 2, 2024
Merged

Conversation

zhli1142015
Copy link
Contributor

What changes were proposed in this pull request?

Enable log function.

How was this patch tested?

UT.

Copy link

Thanks for opening a pull request!

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

https://github.com/apache/incubator-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:

@zhli1142015
Copy link
Contributor Author

cc @rui-mo and @PHILO-HE , thanks.

@@ -407,7 +407,8 @@ std::unordered_map<std::string, std::string> SubstraitParser::substraitVeloxFunc
{"exists", "any_match"},
{"negative", "unaryminus"},
{"get_array_item", "get"},
{"arrays_zip", "zip"}};
{"arrays_zip", "zip"},
{"logarithm", "log"}};
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks strange in existing Gluten code that this function is not named to "log", which is Spark's function name. Maybe, just corrected here:
https://github.com/apache/incubator-gluten/blob/main/shims/common/src/main/scala/org/apache/gluten/expression/ExpressionNames.scala#L178
This may also need the change for CH code. @exmy, does it make sense to you?
https://github.com/apache/incubator-gluten/blob/main/cpp-ch/local-engine/Parser/scalar_function_parser/log.cpp#L41

Copy link
Contributor

Choose a reason for hiding this comment

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

It's ok for me, and the LOG may need change to ln

@zhli1142015 zhli1142015 changed the title [VL] Enable log function [VL] Add test for log function Jul 2, 2024
@zhli1142015 zhli1142015 requested a review from PHILO-HE July 2, 2024 06:43
Copy link
Contributor

@PHILO-HE PHILO-HE left a comment

Choose a reason for hiding this comment

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

Thanks!

@PHILO-HE PHILO-HE merged commit 6b6444e into apache:main Jul 2, 2024
39 checks passed
@GlutenPerfBot
Copy link
Contributor

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

query log/native_master_07_02_2024_time.csv log/native_master_07_01_2024_5d6d214f0_time.csv difference percentage
q1 14.94 19.66 4.716 131.57%
q2 14.59 13.98 -0.607 95.84%
q3 3.99 4.21 0.221 105.55%
q4 64.79 63.74 -1.051 98.38%
q5 8.99 7.86 -1.131 87.41%
q6 2.43 2.39 -0.032 98.69%
q7 4.25 5.24 0.990 123.29%
q8 4.94 3.70 -1.245 74.80%
q9 18.15 22.95 4.793 126.40%
q10 10.50 11.68 1.174 111.18%
q11 37.08 35.50 -1.581 95.74%
q12 2.38 2.44 0.062 102.62%
q13 5.72 5.53 -0.197 96.56%
q14a 43.96 44.64 0.682 101.55%
q14b 39.09 40.59 1.493 103.82%
q15 2.68 3.93 1.251 146.65%
q16 41.98 38.53 -3.444 91.80%
q17 5.93 7.25 1.323 122.30%
q18 6.27 6.66 0.384 106.13%
q19 2.30 2.08 -0.213 90.74%
q20 1.33 1.49 0.157 111.75%
q21 1.10 1.06 -0.037 96.62%
q22 8.35 7.67 -0.674 91.93%
q23a 84.32 84.05 -0.278 99.67%
q23b 103.47 100.62 -2.855 97.24%
q24a 78.77 69.49 -9.279 88.22%
q24b 72.76 68.46 -4.306 94.08%
q25 4.39 8.18 3.797 186.57%
q26 2.96 4.43 1.462 149.33%
q27 3.41 2.86 -0.554 83.78%
q28 21.17 20.85 -0.323 98.48%
q29 7.08 9.59 2.511 135.48%
q30 4.09 5.23 1.140 127.85%
q31 6.30 6.16 -0.144 97.71%
q32 1.23 1.14 -0.096 92.24%
q33 4.72 4.80 0.083 101.76%
q34 6.86 3.66 -3.205 53.29%
q35 7.65 6.73 -0.922 87.96%
q36 3.67 3.29 -0.387 89.47%
q37 4.66 4.02 -0.634 86.40%
q38 14.27 11.92 -2.347 83.55%
q39a 3.53 3.33 -0.199 94.36%
q39b 2.90 2.86 -0.043 98.51%
q40 3.69 8.52 4.834 231.07%
q41 0.70 0.64 -0.057 91.86%
q42 1.08 0.96 -0.118 89.06%
q43 4.02 5.34 1.319 132.85%
q44 8.66 8.81 0.143 101.65%
q45 8.26 3.54 -4.728 42.78%
q46 3.48 3.40 -0.082 97.64%
q47 14.36 14.29 -0.072 99.50%
q48 4.60 4.59 -0.013 99.72%
q49 9.33 10.03 0.698 107.48%
q50 22.19 23.46 1.265 105.70%
q51 11.70 8.63 -3.073 73.74%
q52 1.09 1.03 -0.063 94.26%
q53 2.02 1.99 -0.031 98.47%
q54 3.32 3.37 0.051 101.55%
q55 1.16 1.05 -0.102 91.19%
q56 4.58 5.48 0.903 119.72%
q57 8.80 8.61 -0.194 97.79%
q58 2.67 2.71 0.035 101.32%
q59 13.99 17.09 3.104 122.19%
q60 4.89 4.95 0.063 101.29%
q61 5.49 7.46 1.971 135.92%
q62 5.15 4.34 -0.807 84.32%
q63 2.21 2.24 0.023 101.05%
q64 51.58 48.99 -2.585 94.99%
q65 14.11 13.85 -0.263 98.13%
q66 4.75 3.43 -1.317 72.27%
q67 349.82 355.58 5.763 101.65%
q68 3.67 3.79 0.126 103.42%
q69 6.44 6.55 0.112 101.74%
q70 8.98 8.73 -0.252 97.20%
q71 3.30 4.20 0.905 127.45%
q72 187.54 189.48 1.945 101.04%
q73 2.34 2.37 0.028 101.19%
q74 21.84 21.60 -0.245 98.88%
q75 23.36 23.29 -0.062 99.73%
q76 9.49 12.12 2.625 127.65%
q77 2.15 2.10 -0.046 97.86%
q78 38.92 39.33 0.408 101.05%
q79 3.62 3.45 -0.169 95.33%
q80 11.04 11.00 -0.032 99.71%
q81 5.17 5.29 0.123 102.39%
q82 6.63 7.99 1.355 120.44%
q83 1.58 1.48 -0.108 93.21%
q84 2.81 2.99 0.174 106.17%
q85 7.01 6.89 -0.114 98.37%
q86 3.38 3.17 -0.207 93.87%
q87 12.61 13.43 0.823 106.53%
q88 25.25 24.68 -0.570 97.74%
q89 3.21 7.29 4.077 227.02%
q90 3.86 4.32 0.462 111.99%
q91 2.54 2.68 0.136 105.38%
q92 1.32 1.41 0.090 106.82%
q93 29.02 28.70 -0.325 98.88%
q94 22.00 21.24 -0.760 96.55%
q9 81.02 85.76 4.746 105.86%
q5 3.83 3.47 -0.363 90.51%
q96 12.31 12.28 -0.028 99.78%
q97 2.06 2.08 0.022 101.05%
q98 11.46 9.15 -2.303 79.90%
q99 11.46 9.15 -2.303 79.90%
total 1911.40 1921.10 9.704 100.51%

@GlutenPerfBot
Copy link
Contributor

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

query log/native_master_07_02_2024_time.csv log/native_master_07_01_2024_5d6d214f0_time.csv difference percentage
q1 34.26 34.57 0.312 100.91%
q2 22.32 23.98 1.661 107.44%
q3 40.70 39.13 -1.570 96.14%
q4 33.11 32.81 -0.309 99.07%
q5 69.66 70.64 0.981 101.41%
q6 7.95 8.16 0.210 102.64%
q7 83.02 83.92 0.896 101.08%
q8 84.00 85.80 1.795 102.14%
q9 122.20 120.92 -1.275 98.96%
q10 47.32 46.13 -1.191 97.48%
q11 20.46 21.88 1.418 106.93%
q12 27.16 25.17 -1.997 92.65%
q13 39.74 41.24 1.499 103.77%
q14 19.78 20.05 0.276 101.39%
q15 30.60 33.15 2.547 108.32%
q16 14.01 13.35 -0.662 95.28%
q17 102.42 104.45 2.027 101.98%
q18 151.18 148.04 -3.140 97.92%
q19 14.80 13.81 -0.993 93.29%
q20 31.05 27.79 -3.256 89.51%
q21 264.02 266.41 2.387 100.90%
q22 12.38 13.75 1.370 111.07%
total 1272.16 1275.14 2.986 100.23%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants