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

dag: add builtin scalar func op #2188

Merged
merged 28 commits into from Aug 22, 2017

Conversation

Projects
None yet
4 participants
@choleraehyq

choleraehyq commented Aug 18, 2017

@AndreMouche @hicqu PTAL
GA Scalar func op only UnaryMinus* not implemented.
Signed-off-by: Cholerae Hu huyingqian@pingcap.com

Cholerae Hu added some commits Aug 18, 2017

Cholerae Hu
dag: add builtin scalar func op 1
Signed-off-by: Cholerae Hu <huyingqian@pingcap.com>
Cholerae Hu
dag: add more builtin
Signed-off-by: Cholerae Hu <huyingqian@pingcap.com>
Cholerae Hu
dag: add duration_is_null
Signed-off-by: Cholerae Hu <huyingqian@pingcap.com>
Cholerae Hu
dag: reformat
Signed-off-by: Cholerae Hu <huyingqian@pingcap.com>
Cholerae Hu
dag: add builtin_control
Signed-off-by: Cholerae Hu <huyingqian@pingcap.com>
Cholerae Hu
dag: builtin_control done
Signed-off-by: Cholerae Hu <huyingqian@pingcap.com>

@choleraehyq choleraehyq changed the title from dag: add builtin scalar func op (1) to dag: add builtin scalar func op and builtin control Aug 18, 2017

@choleraehyq choleraehyq changed the title from dag: add builtin scalar func op and builtin control to [WIP] dag: add builtin scalar func op and builtin control Aug 18, 2017

Cholerae Hu
dag: fix bugs
Signed-off-by: Cholerae Hu <huyingqian@pingcap.com>

@choleraehyq choleraehyq changed the title from [WIP] dag: add builtin scalar func op and builtin control to dag: add builtin scalar func op and builtin control Aug 18, 2017

Cholerae Hu
dag: fix a bug about float and 0
Signed-off-by: Cholerae Hu <huyingqian@pingcap.com>
@AndreMouche

Please add unit tests

Show outdated Hide outdated src/coprocessor/dag/expr/builtin_control.rs Outdated
Show outdated Hide outdated src/coprocessor/dag/expr/builtin_control.rs Outdated
Show outdated Hide outdated src/coprocessor/dag/expr/builtin_control.rs Outdated
Cholerae Hu
dag: fix some stupid bugs
Signed-off-by: Cholerae Hu <huyingqian@pingcap.com>
@choleraehyq

This comment has been minimized.

Show comment
Hide comment
@choleraehyq

choleraehyq Aug 19, 2017

I feel like an idiot. Will add unit tests tomorrow.

choleraehyq commented Aug 19, 2017

I feel like an idiot. Will add unit tests tomorrow.

@AndreMouche AndreMouche requested review from AndreMouche, BusyJay and hicqu Aug 21, 2017

Cholerae Hu added some commits Aug 21, 2017

Cholerae Hu
dag: add tests
Signed-off-by: Cholerae Hu <huyingqian@pingcap.com>
Cholerae Hu
dag: fix argument check bug
Signed-off-by: Cholerae Hu <huyingqian@pingcap.com>
@BusyJay

This comment has been minimized.

Show comment
Hide comment
@BusyJay

BusyJay Aug 21, 2017

Contributor

Please split this into two pr: builtin-op and builtin-condition.

Contributor

BusyJay commented Aug 21, 2017

Please split this into two pr: builtin-op and builtin-condition.

Cholerae Hu added some commits Aug 21, 2017

Cholerae Hu
dag: pass tests
Signed-off-by: Cholerae Hu <huyingqian@pingcap.com>
Cholerae Hu
dag: remove builtin_control
Signed-off-by: Cholerae Hu <huyingqian@pingcap.com>
Cholerae Hu
dag: make clippy happy
Signed-off-by: Cholerae Hu <huyingqian@pingcap.com>
@choleraehyq

This comment has been minimized.

Show comment
Hide comment
@choleraehyq

choleraehyq commented Aug 21, 2017

@choleraehyq choleraehyq changed the title from dag: add builtin scalar func op and builtin control to dag: add builtin scalar func op Aug 21, 2017

Cholerae Hu
dag: make rustfmt happy
Signed-off-by: Cholerae Hu <huyingqian@pingcap.com>
Show outdated Hide outdated src/coprocessor/dag/expr/builtin_op.rs Outdated
Show outdated Hide outdated src/coprocessor/dag/expr/builtin_op.rs Outdated
Show outdated Hide outdated src/coprocessor/dag/expr/builtin_op.rs Outdated
Show outdated Hide outdated src/coprocessor/dag/expr/builtin_op.rs Outdated
Show outdated Hide outdated src/coprocessor/dag/expr/builtin_op.rs Outdated
Show outdated Hide outdated src/coprocessor/dag/expr/builtin_op.rs Outdated

Cholerae Hu added some commits Aug 21, 2017

Cholerae Hu
dag: address comment
Signed-off-by: Cholerae Hu <huyingqian@pingcap.com>
Cholerae Hu
dag: fix a bug in real_is_true
Signed-off-by: Cholerae Hu <huyingqian@pingcap.com>

Cholerae Hu added some commits Aug 21, 2017

Cholerae Hu
dag: reformat
Signed-off-by: Cholerae Hu <huyingqian@pingcap.com>
Cholerae Hu
dag: use try_opt to simplified codes
Signed-off-by: Cholerae Hu <huyingqian@pingcap.com>
Cholerae Hu
dag: address comment
Signed-off-by: Cholerae Hu <huyingqian@pingcap.com>
Show outdated Hide outdated src/coprocessor/dag/expr/builtin_op.rs Outdated
Show outdated Hide outdated src/coprocessor/dag/expr/builtin_op.rs Outdated
Show outdated Hide outdated src/coprocessor/dag/expr/builtin_op.rs Outdated
Show outdated Hide outdated src/coprocessor/dag/expr/builtin_op.rs Outdated
Show outdated Hide outdated src/coprocessor/dag/expr/builtin_op.rs Outdated
Show outdated Hide outdated src/coprocessor/dag/expr/builtin_op.rs Outdated
Show outdated Hide outdated src/coprocessor/dag/expr/builtin_op.rs Outdated
Show outdated Hide outdated src/coprocessor/dag/expr/builtin_op.rs Outdated
Show outdated Hide outdated src/coprocessor/dag/expr/builtin_op.rs Outdated
Show outdated Hide outdated src/coprocessor/dag/expr/builtin_op.rs Outdated
Show outdated Hide outdated src/coprocessor/dag/expr/builtin_op.rs Outdated

Cholerae Hu added some commits Aug 22, 2017

Cholerae Hu
dag: address comment
Signed-off-by: Cholerae Hu <huyingqian@pingcap.com>
Cholerae Hu
dag: use map_or to replace unwrap
Signed-off-by: Cholerae Hu <huyingqian@pingcap.com>
@choleraehyq

This comment has been minimized.

Show comment
Hide comment

choleraehyq commented Aug 22, 2017

Cholerae Hu
dag: fix logical_or bug
Signed-off-by: Cholerae Hu <huyingqian@pingcap.com>
Show outdated Hide outdated src/coprocessor/dag/expr/builtin_op.rs Outdated
Show outdated Hide outdated src/coprocessor/dag/expr/builtin_op.rs Outdated
fn test_logic_op() {
let tests = vec![
(
ScalarFuncSig::LogicalAnd,

This comment has been minimized.

@BusyJay

BusyJay Aug 22, 2017

Contributor

You can reduce cases by always checking result is the same after switching lhs and rhs.

@BusyJay

BusyJay Aug 22, 2017

Contributor

You can reduce cases by always checking result is the same after switching lhs and rhs.

Show outdated Hide outdated src/coprocessor/dag/expr/builtin_op.rs Outdated
Show outdated Hide outdated src/coprocessor/dag/expr/builtin_op.rs Outdated
Show outdated Hide outdated src/coprocessor/dag/expr/builtin_op.rs Outdated
Show outdated Hide outdated src/coprocessor/dag/expr/builtin_op.rs Outdated
Show outdated Hide outdated src/coprocessor/dag/expr/builtin_op.rs Outdated
Cholerae Hu
dag: address comment
Signed-off-by: Cholerae Hu <huyingqian@pingcap.com>
Show outdated Hide outdated src/coprocessor/dag/expr/fncall.rs Outdated
Show outdated Hide outdated src/coprocessor/dag/expr/mod.rs Outdated
Cholerae Hu
dag: address comment
Signed-off-by: Cholerae Hu <huyingqian@pingcap.com>
@choleraehyq

This comment has been minimized.

Show comment
Hide comment

choleraehyq commented Aug 22, 2017

@AndreMouche

LGTM

@AndreMouche AndreMouche merged commit 038bc18 into master Aug 22, 2017

2 checks passed

ci/circleci Your tests passed on CircleCI!
Details
license/cla Contributor License Agreement is signed.
Details

@AndreMouche AndreMouche deleted the hyq/scalarfuncop branch Aug 22, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment