Skip to content

Commit

Permalink
executor: turn on switch for tipb.ExprType_MysqlTime. (pingcap#1629)
Browse files Browse the repository at this point in the history
* executor: turn on switch for tipb.ExprType_MysqlTime.

* executor: turn off decimal as the codec has changed.
  • Loading branch information
coocood authored Aug 24, 2016
1 parent 7c389ac commit 06b2a64
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions executor/executor_xapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,7 @@ func (b *executorBuilder) columnNameToPBExpr(client kv.Client, column *ast.Colum
return nil
}
switch column.Refer.Expr.GetType().Tp {
case mysql.TypeBit, mysql.TypeSet, mysql.TypeEnum, mysql.TypeGeometry,
mysql.TypeDate, mysql.TypeNewDate, mysql.TypeDatetime, mysql.TypeTimestamp, mysql.TypeYear:
case mysql.TypeBit, mysql.TypeSet, mysql.TypeEnum, mysql.TypeGeometry, mysql.TypeNewDecimal:
return nil
}
matched := false
Expand Down
3 changes: 1 addition & 2 deletions executor/new_executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -1118,8 +1118,7 @@ func (b *executorBuilder) columnToPBExpr(client kv.Client, column *expression.Co
return nil
}
switch column.GetType().Tp {
case mysql.TypeBit, mysql.TypeSet, mysql.TypeEnum, mysql.TypeGeometry,
mysql.TypeDate, mysql.TypeNewDate, mysql.TypeDatetime, mysql.TypeTimestamp, mysql.TypeYear:
case mysql.TypeBit, mysql.TypeSet, mysql.TypeEnum, mysql.TypeGeometry, mysql.TypeNewDecimal:
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion store/localstore/local_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func supportExpr(exprType tipb.ExprType) bool {
switch exprType {
case tipb.ExprType_Null, tipb.ExprType_Int64, tipb.ExprType_Uint64, tipb.ExprType_Float32,
tipb.ExprType_Float64, tipb.ExprType_String, tipb.ExprType_Bytes,
tipb.ExprType_MysqlDuration, tipb.ExprType_MysqlDecimal,
tipb.ExprType_MysqlDuration, tipb.ExprType_MysqlDecimal, tipb.ExprType_MysqlTime,
tipb.ExprType_ColumnRef,
tipb.ExprType_And, tipb.ExprType_Or,
tipb.ExprType_LT, tipb.ExprType_LE, tipb.ExprType_EQ, tipb.ExprType_NE,
Expand Down
2 changes: 1 addition & 1 deletion store/tikv/coprocessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (c *CopClient) SupportRequestType(reqType, subType int64) bool {
func supportExpr(exprType tipb.ExprType) bool {
switch exprType {
case tipb.ExprType_Null, tipb.ExprType_Int64, tipb.ExprType_Uint64, tipb.ExprType_String, tipb.ExprType_Bytes,
tipb.ExprType_MysqlDuration, tipb.ExprType_MysqlDecimal,
tipb.ExprType_MysqlDuration, tipb.ExprType_MysqlTime,
tipb.ExprType_ColumnRef,
tipb.ExprType_And, tipb.ExprType_Or,
tipb.ExprType_LT, tipb.ExprType_LE, tipb.ExprType_EQ, tipb.ExprType_NE,
Expand Down

0 comments on commit 06b2a64

Please sign in to comment.