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

Add RPN compare functions for Int, Decimal, String, Time, Duration and Json #4625

Merged
merged 25 commits into from May 8, 2019

Conversation

Projects
None yet
4 participants
@breeswish
Copy link
Member

commented May 5, 2019

What have you changed? (mandatory)

Extracted from #3898

This PR adds compare functions for Int, Decimal, String, Time, Duration and Json.

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)

Int, Decimal and Duration are unit tested.

breeswish added some commits Apr 29, 2019

Add logical or
Signed-off-by: Breezewish <breezewish@pingcap.com>
Use LogicalOr in mapping function
Signed-off-by: Breezewish <breezewish@pingcap.com>
Add real compare functions
Signed-off-by: Breezewish <breezewish@pingcap.com>
Make code simpler
Signed-off-by: Breezewish <breezewish@pingcap.com>
Address comments to resolve some trivial issues
Signed-off-by: Breezewish <breezewish@pingcap.com>
Merge remote-tracking branch 'origin/master' into ___batch_extract/t6/2
Signed-off-by: Breezewish <breezewish@pingcap.com>
Introduce cop_codegen
Signed-off-by: Breezewish <breezewish@pingcap.com>
Merge remote-tracking branch 'origin/master' into ___batch_extract/t6/3
Signed-off-by: Breezewish <breezewish@pingcap.com>
Add compare functions for other data types
Signed-off-by: Breezewish <breezewish@pingcap.com>
@breeswish

This comment has been minimized.

Copy link
Member Author

commented May 5, 2019

/run-integration-tests

breeswish and others added some commits May 5, 2019

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

@breeswish breeswish referenced this pull request May 6, 2019

Merged

Introduce tipb_helper #4634

breeswish added some commits May 6, 2019

Require explicit args = 0
Signed-off-by: Breezewish <breezewish@pingcap.com>
@zhouqiang-cl

This comment has been minimized.

Copy link
Collaborator

commented May 7, 2019

/test

@breeswish

This comment has been minimized.

Copy link
Member Author

commented May 7, 2019

/run-integration-tests

@AndreMouche
Copy link
Member

left a comment

Rest LGTM

children: &[Expr],
) -> Result<Box<dyn RpnFunction>> {
// FIXME: The signature for different signed / unsigned int should be inferred at TiDB side.
if children.len() != 2 {

This comment has been minimized.

Copy link
@AndreMouche

AndreMouche May 7, 2019

Member

Should we check all functions in map_pb_sig_to_rpn_func?

This comment has been minimized.

Copy link
@breeswish

breeswish May 7, 2019

Author Member

We map the rest to Error, so that the fallback will work (when it returns error).

@breeswish breeswish referenced this pull request May 7, 2019

Merged

Batch Simple Aggregation Executor #4635

1 of 1 task complete
// FIXME: The signature for different signed / unsigned int should be inferred at TiDB side.
if children.len() != 2 {
return Err(box_err!(
"ScalarFunction {:?} (params = {}) is not supported in batch mode",

This comment has been minimized.

Copy link
@lonng

lonng May 8, 2019

Contributor

Is RPN function just be used in batch mode? The error message should be refined if RPN function will be used in more widely scenarios.

This comment has been minimized.

Copy link
@breeswish

breeswish May 8, 2019

Author Member

It is only used in batch.

))
}
_ => return Err(box_err!(
"ScalarFunction {:?} is not supported in batch mode",

This comment has been minimized.

Copy link
@lonng

lonng May 8, 2019

Contributor

(ditto)

@lonng

lonng approved these changes May 8, 2019

Copy link
Contributor

left a comment

LGTM

@breeswish breeswish merged commit 396ae2d into tikv:master May 8, 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_extract/t6/4 branch May 8, 2019

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.