|
|
@ -165,6 +165,16 @@ func TestJSONQueries(t *testing.T) { |
|
|
|
query: `SELECT * from s3object s WHERE (7,8.5,9) = s.nested[1]`, |
|
|
|
query: `SELECT * from s3object s WHERE (7,8.5,9) = s.nested[1]`, |
|
|
|
wantResult: `{"id":3,"title":"Second Record","desc":"another text","nested":[[2,3,4],[7,8.5,9]]}`, |
|
|
|
wantResult: `{"id":3,"title":"Second Record","desc":"another text","nested":[[2,3,4],[7,8.5,9]]}`, |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name: "indexed-list-match-equals-s-star", |
|
|
|
|
|
|
|
query: `SELECT s.* from s3object s WHERE (7,8.5,9) = s.nested[1]`, |
|
|
|
|
|
|
|
wantResult: `{"id":3,"title":"Second Record","desc":"another text","nested":[[2,3,4],[7,8.5,9]]}`, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name: "indexed-list-match-equals-s-index", |
|
|
|
|
|
|
|
query: `SELECT s.nested[1], s.nested[0] from s3object s WHERE (7,8.5,9) = s.nested[1]`, |
|
|
|
|
|
|
|
wantResult: `{"_1":[7,8.5,9],"_2":[2,3,4]}`, |
|
|
|
|
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
name: "indexed-list-match-not-equals", |
|
|
|
name: "indexed-list-match-not-equals", |
|
|
|
query: `SELECT * from s3object s WHERE (7,8.5,9) != s.nested[1]`, |
|
|
|
query: `SELECT * from s3object s WHERE (7,8.5,9) != s.nested[1]`, |
|
|
|