Skip to content

Commit

Permalink
aggfuncs: bit_or add only handle uint64 judge
Browse files Browse the repository at this point in the history
  • Loading branch information
crazycs520 committed Jul 5, 2018
1 parent da9bfd1 commit d826d6b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions executor/aggfuncs/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,15 @@ func buildGroupConcat(aggFuncDesc *aggregation.AggFuncDesc, ordinal int) AggFunc
// buildCount builds the AggFunc implementation for function "BIT_OR".
func buildBitOr(aggFuncDesc *aggregation.AggFuncDesc, ordinal int) AggFunc {
// BIT_OR doesn't need to handle the distinct property.
base := baseAggFunc{
args: aggFuncDesc.Args,
ordinal: ordinal,
switch aggFuncDesc.Args[0].GetType().Tp {
case mysql.TypeLonglong:
base := baseAggFunc{
args: aggFuncDesc.Args,
ordinal: ordinal,
}
return &bitOrUint64{baseBitAggFunc{base}}
}
return &bitOrUint64{baseBitAggFunc{base}}
return nil
}

// buildCount builds the AggFunc implementation for function "BIT_XOR".
Expand Down

0 comments on commit d826d6b

Please sign in to comment.