mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
parent
c08540c7b7
commit
2cea944cdb
@ -474,6 +474,13 @@ func TestJSONQueries(t *testing.T) {
|
||||
wantResult: `{"Id":1,"Name":"Anshu","Address":"Templestowe","Car":"Jeep"}`,
|
||||
withJSON: `{ "person": [ { "Id": 1, "Name": "Anshu", "Address": "Templestowe", "Car": "Jeep" }, { "Id": 2, "Name": "Ben Mostafa", "Address": "Las Vegas", "Car": "Mustang" }, { "Id": 3, "Name": "Rohan Wood", "Address": "Wooddon", "Car": "VW" } ] }`,
|
||||
},
|
||||
{
|
||||
name: "lower-case-is",
|
||||
query: `select * from s3object[*] as s where s.request.header['User-Agent'] is not null`,
|
||||
wantResult: `{"request":{"uri":"/1","header":{"User-Agent":"test"}}}`,
|
||||
withJSON: `{"request":{"uri":"/1","header":{"User-Agent":"test"}}}
|
||||
{"request":{"uri":"/2","header":{}}}`,
|
||||
},
|
||||
}
|
||||
|
||||
defRequest := `<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
@ -22,6 +22,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"math"
|
||||
"strings"
|
||||
|
||||
"github.com/bcicen/jstream"
|
||||
"github.com/minio/simdjson-go"
|
||||
@ -134,7 +135,7 @@ func (e *ConditionOperand) evalNode(r Record, tableAlias string) (*Value, error)
|
||||
return nil, cmpRErr
|
||||
}
|
||||
|
||||
b, err := opVal.compareOp(e.ConditionRHS.Compare.Operator, cmpRight)
|
||||
b, err := opVal.compareOp(strings.ToUpper(e.ConditionRHS.Compare.Operator), cmpRight)
|
||||
return FromBool(b), err
|
||||
|
||||
case e.ConditionRHS.Between != nil:
|
||||
|
Loading…
Reference in New Issue
Block a user