s3 select: Infer types for comparison (#9438)

This commit is contained in:
Klaus Post
2020-04-24 22:02:59 +02:00
committed by GitHub
parent 20766069a8
commit e4900b99d7
2 changed files with 13 additions and 1 deletions

View File

@@ -250,6 +250,9 @@ func (e *In) evalInNode(r Record, lhs *Value) (*Value, error) {
// Compare two values in terms of in-ness.
var cmp func(a, b Value) bool
cmp = func(a, b Value) bool {
// Convert if needed.
inferTypesForCmp(&a, &b)
if a.Equals(b) {
return true
}
@@ -272,7 +275,6 @@ func (e *In) evalInNode(r Record, lhs *Value) (*Value, error) {
aF, aOK := a.ToFloat()
bF, bOK := b.ToFloat()
// FIXME: more type inference?
return aOK && bOK && aF == bF
}