Skip to content

Commit

Permalink
delete microsecond for timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
rebelice committed Jan 7, 2022
1 parent f396110 commit cedb6e4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion expression/explain.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,12 @@ func (expr *Constant) format4S3(dt types.Datum) string {
case types.KindNull:
return "NULL"
case types.KindString, types.KindBytes, types.KindMysqlEnum, types.KindMysqlSet,
types.KindMysqlJSON, types.KindBinaryLiteral, types.KindMysqlBit, types.KindMysqlTime:
types.KindMysqlJSON, types.KindBinaryLiteral, types.KindMysqlBit:
return fmt.Sprintf("'%v'", dt.GetValue())
case types.KindMysqlTime:
t := dt.Clone().GetMysqlTime()
t.SetFsp(0)
return fmt.Sprintf("'%v'", t)
}
return fmt.Sprintf("%v", dt.GetValue())
}
Expand Down

0 comments on commit cedb6e4

Please sign in to comment.