S3 Select: Mismatched types don't match (#8608)

When comparing for equality, if types cannot be matched, they don't match.
This commit is contained in:
Klaus Post
2019-12-06 07:24:41 -08:00
committed by kannappanr
parent 97deba2a7c
commit f1e2e1cc9e
2 changed files with 34 additions and 2 deletions

View File

@@ -445,7 +445,14 @@ func (v *Value) compareOp(op string, a *Value) (res bool, err error) {
return timestampCompare(op, timestampV, timestampA), nil
}
return false, errCmpMismatchedTypes
// Types cannot be compared, they do not match.
switch op {
case opEq:
return false, nil
case opIneq:
return true, nil
}
return false, errCmpInvalidBoolOperator
}
func inferTypesForCmp(a *Value, b *Value) error {