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

cop: Support CASE_WHEN #5020

Merged
merged 8 commits into from Jul 5, 2019

Conversation

Projects
None yet
3 participants
@breeswish
Copy link
Member

commented Jul 4, 2019

Signed-off-by: Breezewish breezewish@pingcap.com

What have you changed? (mandatory)

This PR adds RPN function CASE_WHEN().

What are the type of the changes? (mandatory)

  • Improvement (change which is an improvement to an existing feature)

How has this PR been tested? (mandatory)

Unit test.

breeswish added some commits Jul 4, 2019

Support CASE_WHEN
Signed-off-by: Breezewish <breezewish@pingcap.com>
@breeswish

This comment has been minimized.

Copy link
Member Author

commented Jul 5, 2019

/run-integration-tests

@lonng

This comment has been minimized.

Copy link
Contributor

commented Jul 5, 2019

Please add some comments for raw_arg.

Add some helps for varg and raw_varg
Signed-off-by: Breezewish <breezewish@pingcap.com>
for chunk in args.chunks(2) {
if chunk.len() == 1 {
// else statement
// TODO: Must verify type

This comment has been minimized.

Copy link
@sticnarf

sticnarf Jul 5, 2019

Contributor

With this concern, can we land this PR now? An invalid request just makes it panic.

This comment has been minimized.

Copy link
@breeswish

breeswish Jul 5, 2019

Author Member

Invalid requests make other RPN function (including fixed args ones) panic already 😅 For example, pass in an Int while the function accept Real.

This comment has been minimized.

Copy link
@breeswish

breeswish Jul 5, 2019

Author Member

A fully functional validation will be resolved by #5033

@breeswish breeswish referenced this pull request Jul 5, 2019

Merged

Support RPN function validator #5033

1 of 1 task complete
Fix bug according to comments
Signed-off-by: Breezewish <breezewish@pingcap.com>
@sticnarf
Copy link
Contributor

left a comment

LGTM

@lonng

lonng approved these changes Jul 5, 2019

@breeswish

This comment has been minimized.

Copy link
Member Author

commented Jul 5, 2019

/run-integration-tests

@sticnarf sticnarf merged commit acc2992 into tikv:master Jul 5, 2019

2 checks passed

DCO All commits are signed off!
Details
idc-jenkins-ci/test Jenkins job succeeded.
Details

@breeswish breeswish deleted the breeswish:__batch/case_when branch Jul 5, 2019

breeswish added a commit to breeswish/tikv that referenced this pull request Jul 9, 2019

cop: Support CASE_WHEN (tikv#5020)
* Support CASE_WHEN

Signed-off-by: Breezewish <breezewish@pingcap.com>

* Add some helps for varg and raw_varg

Signed-off-by: Breezewish <breezewish@pingcap.com>

* Fix bug according to comments

Signed-off-by: Breezewish <breezewish@pingcap.com>

breeswish added a commit to breeswish/tikv that referenced this pull request Jul 9, 2019

cop: Support CASE_WHEN (tikv#5020)
* Support CASE_WHEN

Signed-off-by: Breezewish <breezewish@pingcap.com>

* Add some helps for varg and raw_varg

Signed-off-by: Breezewish <breezewish@pingcap.com>

* Fix bug according to comments

Signed-off-by: Breezewish <breezewish@pingcap.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.