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

expression: support builtin function "benchmark" #8313

Closed
wants to merge 8 commits into from

Conversation

vikingM
Copy link

@vikingM vikingM commented Nov 14, 2018

What problem does this PR solve?

#6774

What is changed and how it works?

add the benchmark function
now this function args are (int,string)

Check List

Tests

  • Manual test
    select benchmark(10000,md5(rand()));

Code changes
in expression/builtin_info.go
add the related codes


This change is Reviewable

@sre-bot
Copy link
Contributor

sre-bot commented Nov 14, 2018

Hi contributor, thanks for your PR.

This patch needs to be approved by someone of admins. They should reply with "/ok-to-test" to accept this PR for running test automatically.

@CLAassistant
Copy link

CLAassistant commented Nov 14, 2018

CLA assistant check
All committers have signed the CLA.

@zz-jason zz-jason changed the title buildinfunction benchamrk() exxpression: support builtin function "benchmark" Nov 14, 2018
@zz-jason zz-jason changed the title exxpression: support builtin function "benchmark" expression: support builtin function "benchmark" Nov 14, 2018
@zz-jason zz-jason added contribution This PR is from a community contributor. component/expression labels Nov 14, 2018
pre-commit Outdated Show resolved Hide resolved
@zz-jason
Copy link
Member

@vikingM Please fix the CI.

@vikingM
Copy link
Author

vikingM commented Nov 22, 2018

the conflict file just because when i create a json object, i found in "datumsToConstants" think it is a string object

expression/builtin_info.go Outdated Show resolved Hide resolved
expression/builtin_info.go Outdated Show resolved Hide resolved
expression/evaluator_test.go Outdated Show resolved Hide resolved
expression/builtin_info_test.go Outdated Show resolved Hide resolved
expression/builtin_info_test.go Outdated Show resolved Hide resolved
expression/builtin_info_test.go Outdated Show resolved Hide resolved
@zz-jason
Copy link
Member

Please merge the latest master branch and resolve conflicts.

expression/builtin_info_test.go Outdated Show resolved Hide resolved
expression/builtin_info.go Outdated Show resolved Hide resolved
@zz-jason
Copy link
Member

zz-jason commented Jan 2, 2019

@vikingM Please merge the latest master and resolve conflicts.

Copy link
Contributor

@XuHuaiyu XuHuaiyu left a comment

Choose a reason for hiding this comment

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

Hi, @vikingM
Please add some integration cases for benchmark.

@zz-jason zz-jason removed their request for review January 3, 2019 08:04
@zz-jason
Copy link
Member

zz-jason commented Jan 8, 2019

@vikingM any update? there is a conflict between this and the master branch. Could you update to the latest master and resolve the conflicts in your spare time?

@vikingM
Copy link
Author

vikingM commented Jan 8, 2019 via email

@codecov-io
Copy link

codecov-io commented Jan 8, 2019

Codecov Report

Merging #8313 into master will decrease coverage by 0.04%.
The diff coverage is 44.71%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #8313      +/-   ##
=========================================
- Coverage   67.55%   67.5%   -0.05%     
=========================================
  Files         363     363              
  Lines       75301   75423     +122     
=========================================
+ Hits        50868   50918      +50     
- Misses      19940   19997      +57     
- Partials     4493    4508      +15
Impacted Files Coverage Δ
expression/builtin_info.go 54.1% <44.71%> (-7.07%) ⬇️
util/systimemon/systime_mon.go 80% <0%> (-20%) ⬇️
expression/schema.go 94.11% <0%> (-0.85%) ⬇️
executor/join.go 78.29% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bb2d56a...69ba828. Read the comment docs.

{[]interface{}{1000, types.NewDecFromFloatForTest(1.1)}, 0, false, false},
{[]interface{}{1000, types.Duration{Duration: time.Duration(0)}}, 0, false, false},
{[]interface{}{1000, jsonObj}, 0, false, false},
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please add some cases that generate some errors or nil results~?

@zz-jason
Copy link
Member

@vikingM I'm sorry to inform you that builtin function benchmark() has been supported in this PR #9252, I'm going to close this PR now. Anyway, thanks for your contribution.

@zz-jason zz-jason closed this Feb 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/expression contribution This PR is from a community contributor.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants