fix typo and the string representation of the time.Time value (#7831)

master
Yao Zongyou 6 years ago committed by kannappanr
parent 23b9df0694
commit 90a3b830f4
  1. 4
      pkg/s3select/sql/value.go

@ -97,7 +97,7 @@ func (v *Value) Repr() string {
case typeBool, typeInt, typeFloat: case typeBool, typeInt, typeFloat:
return fmt.Sprintf("%v:%s", v.value, v.GetTypeString()) return fmt.Sprintf("%v:%s", v.value, v.GetTypeString())
case typeTimestamp: case typeTimestamp:
return fmt.Sprintf("%s:TIMESTAMP", v.value.(*time.Time)) return fmt.Sprintf("%s:TIMESTAMP", v.value.(time.Time))
case typeString: case typeString:
return fmt.Sprintf("\"%s\":%s", v.value.(string), v.GetTypeString()) return fmt.Sprintf("\"%s\":%s", v.value.(string), v.GetTypeString())
case typeBytes: case typeBytes:
@ -335,7 +335,7 @@ func (v *Value) compareOp(op string, a *Value) (res bool, err error) {
} }
boolV, ok1b := v.ToBool() boolV, ok1b := v.ToBool()
boolA, ok2b := v.ToBool() boolA, ok2b := a.ToBool()
if ok1b && ok2b { if ok1b && ok2b {
return boolCompare(op, boolV, boolA) return boolCompare(op, boolV, boolA)
} }

Loading…
Cancel
Save