Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ion tests for boxed variant/ion changes. #131

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions partiql-tests-data/eval/ion/primitives/null.ion
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
EvalModeCoerce,
EvalModeError
],
output:null
output:$ion::null
}
},
{
Expand All @@ -20,7 +20,7 @@
EvalModeCoerce,
EvalModeError
],
output:null.bool
output:$ion::null.bool
}
},
{
Expand All @@ -32,7 +32,7 @@
EvalModeCoerce,
EvalModeError
],
output:null.int
output:$ion::null.int
}
},
{
Expand All @@ -44,7 +44,7 @@
EvalModeCoerce,
EvalModeError
],
output:null.decimal
output:$ion::null.decimal
}
},
{
Expand All @@ -56,7 +56,7 @@
EvalModeCoerce,
EvalModeError
],
output:null.string
output:$ion::null.string
}
},
{
Expand All @@ -68,7 +68,7 @@
EvalModeCoerce,
EvalModeError
],
output:null.symbol
output:$ion::null.symbol
}
},
{
Expand All @@ -80,7 +80,7 @@
EvalModeCoerce,
EvalModeError
],
output:null.clob
output:$ion::null.clob
}
},
{
Expand All @@ -92,7 +92,7 @@
EvalModeCoerce,
EvalModeError
],
output:null.blob
output:$ion::null.blob
}
},
{
Expand All @@ -104,7 +104,7 @@
EvalModeCoerce,
EvalModeError
],
output:null.list
output:$ion::null.list
}
},
{
Expand All @@ -116,7 +116,7 @@
EvalModeCoerce,
EvalModeError
],
output:null.struct
output:$ion::null.struct
}
},
{
Expand All @@ -128,7 +128,7 @@
EvalModeCoerce,
EvalModeError
],
output:null.sexp
output:$ion::null.sexp
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ envs::{
nary::[
{
name:"equalListDifferentTypesTrue",
statement:"[1, 2e0, 'hello'] = [1.0, 2, `hello`]",
statement:"[1, 2e0, `hello`] = [1.0, 2, `hello`]",
assert:{
evalMode:[EvalModeCoerce, EvalModeError],
result:EvaluationSuccess,
Expand All @@ -16,7 +16,7 @@ nary::[
},
{
name:"listDifferentTypesDifferentOrderFalse",
statement:"[1, 2e0, 'hello'] = [`hello`, 2, 1.0]",
statement:"[1, 2e0, `hello`] = [`hello`, 2, 1.0]",
assert:{
evalMode:[EvalModeCoerce, EvalModeError],
result:EvaluationSuccess,
Expand All @@ -25,7 +25,7 @@ nary::[
},
{
name:"equalBagDifferentTypesDifferentOrderTrue",
statement:"<<1, 2e0, 'hello'>> = <<`hello`, 2, 1.0>>",
statement:"<<1, 2e0, `hello`>> = <<`hello`, 2, 1.0>>",
assert:{
evalMode:[EvalModeCoerce, EvalModeError],
result:EvaluationSuccess,
Expand All @@ -34,7 +34,7 @@ nary::[
},
{
name:"equalBagDifferentTypesWithNullMissingDifferentOrderTrue",
statement:"<<1, 2e0, 'hello', NULL, MISSING>> = <<MISSING, NULL, `hello`, 2, 1.0>>",
statement:"<<1, 2e0, `hello`, NULL, MISSING>> = <<MISSING, NULL, `hello`, 2, 1.0>>",
assert:{
evalMode:[EvalModeCoerce, EvalModeError],
result:EvaluationSuccess,
Expand Down
2 changes: 1 addition & 1 deletion partiql-tests-data/eval/ion/primitives/symbol.ion
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
evalMode: EvalModeCoerce,
output: $bag::[
{
'': 1
'': $ion::1
}
]
},
Expand Down
22 changes: 11 additions & 11 deletions partiql-tests-data/eval/ion/query/order-by.ion
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edge_cases::[
assert:{
evalMode:[EvalModeCoerce, EvalModeError],
result:EvaluationSuccess,
output:[{'a': nan}, {'a': -inf}, {'a': -0.5}, {'a': 5}, {'a': 7}, {'a': 9}, {'a': +inf}]
output:[{'a': $ion::nan}, {'a': $ion::-inf}, {'a': -0.5}, {'a': 5}, {'a': 7}, {'a': 9}, {'a': $ion::+inf}]
}
},
// +inf before numeric values then -inf then nan (DESC)
Expand All @@ -16,7 +16,7 @@ edge_cases::[
assert:{
evalMode:[EvalModeCoerce, EvalModeError],
result:EvaluationSuccess,
output:[{'a': +inf}, {'a': 9}, {'a': 7}, {'a': 5}, {'a': -0.5}, {'a': -inf}, {'a': nan}]
output:[{'a': $ion::+inf}, {'a': 9}, {'a': 7}, {'a': 5}, {'a': -0.5}, {'a': $ion::-inf}, {'a': $ion::nan}]
}
},
// text types compared by lexicographical ordering of Unicode scalar (ASC)
Expand All @@ -26,7 +26,7 @@ edge_cases::[
assert:{
evalMode:[EvalModeCoerce, EvalModeError],
result:EvaluationSuccess,
output:[{'a': '0'}, {'a': '9'}, {'a': 'A'}, {'a': 'Z'}, {'a': 'a'}, {'a': 'z'}, {'a': '\uD83D\uDCA9'}, {'a': "\U0001F4A9"}]
output:[{'a': '0'}, {'a': '9'}, {'a': 'A'}, {'a': 'Z'}, {'a': 'a'}, {'a': 'z'}, {'a': $ion::'\uD83D\uDCA9'}, {'a': $ion::"\U0001F4A9"}]
}
},
// text types compared by lexicographical ordering of Unicode scalar (DESC)
Expand All @@ -36,7 +36,7 @@ edge_cases::[
assert:{
evalMode:[EvalModeCoerce, EvalModeError],
result:EvaluationSuccess,
output:[{'a': '\uD83D\uDCA9'}, {'a': "\U0001F4A9"}, {'a': 'z'}, {'a': 'a'}, {'a': 'Z'}, {'a': 'A'}, {'a': '9'}, {'a': '0'}]
output:[{'a': $ion::'\uD83D\uDCA9'}, {'a': $ion::"\U0001F4A9"}, {'a': 'z'}, {'a': 'a'}, {'a': 'Z'}, {'a': 'A'}, {'a': '9'}, {'a': '0'}]
}
},
// LOB types follow their lexicographical ordering by octet (ASC)
Expand All @@ -46,7 +46,7 @@ edge_cases::[
assert:{
evalMode:[EvalModeCoerce, EvalModeError],
result:EvaluationSuccess,
output:[{'a': {{"A"}}}, {'a': {{"Z"}}}, {'a': {{"a"}}}, {'a': {{"z"}}}]
output:[{'a': $ion::{{"A"}}}, {'a': $ion::{{"Z"}}}, {'a': $ion::{{"a"}}}, {'a': $ion::{{"z"}}}]
}
},
// LOB types should ordered (DESC)
Expand All @@ -56,7 +56,7 @@ edge_cases::[
assert:{
evalMode:[EvalModeCoerce, EvalModeError],
result:EvaluationSuccess,
output:[{'a': {{"z"}}}, {'a': {{"a"}}}, {'a': {{"Z"}}}, {'a': {{"A"}}}]
output:[{'a': $ion::{{"z"}}}, {'a': $ion::{{"a"}}}, {'a': $ion::{{"Z"}}}, {'a': $ion::{{"A"}}}]
}
},
// lists items should be ordered by data types (ASC) (nulls last as default for asc)
Expand All @@ -66,17 +66,17 @@ edge_cases::[
assert:{
evalMode:[EvalModeCoerce, EvalModeError],
result:EvaluationSuccess,
output:[{'a': [true]}, {'a': [1]}, {'a': ["a"]}, {'a': [{{}}]}, {'a': [[]]}, {'a': [{}]}, {'a': [$bag::[]]}, {'a': [null]}]
output:[{'a': [true]}, {'a': [1]}, {'a': ["a"]}, {'a': [$ion::{{}}]}, {'a': [[]]}, {'a': [{}]}, {'a': [$bag::[]]}, {'a': [null]}]
}
},
// lists items should be ordered by data types (DESC) (nulls first as default for desc)
{
name:"lists items should be ordered by data types (DESC) (nulls first as default for desc)",
statement:"SELECT * FROM [{'a': ['a']}, {'a': [1]}, {'a': [true]}, {'a': [null]}, {'a': [{}]}, {'a': [<<>>]}, {'a': [`{{}}`]}, {'a': [[]]} ] ORDER BY a DESC",
statement:"SELECT * FROM [{'a': ['a']}, {'a': [1]}, {'a': [true]}, {'a': [null]}, {'a': [{}]}, {'a': [<<>>]}, {'a': [`{{ +AB/ }}`]}, {'a': [[]]} ] ORDER BY a DESC",
assert:{
evalMode:[EvalModeCoerce, EvalModeError],
result:EvaluationSuccess,
output:[{'a': [null]}, {'a': [$bag::[]]}, {'a': [{}]}, {'a': [[]]}, {'a': [{{}}]}, {'a': ["a"]}, {'a': [1]}, {'a': [true]}]
output:[{'a': [null]}, {'a': [$bag::[]]}, {'a': [{}]}, {'a': [[]]}, {'a': [$ion::{{ +AB/ }}]}, {'a': ["a"]}, {'a': [1]}, {'a': [true]}]
}
},
// structs should be ordered by data types (ASC) (nulls last as default for asc)
Expand All @@ -86,7 +86,7 @@ edge_cases::[
assert:{
evalMode:[EvalModeCoerce, EvalModeError],
result:EvaluationSuccess,
output:[{'a': {'a': true}}, {'a': {'a': 5}}, {'a': {'a': "b"}}, {'a': {'a': {{}}}}, {'a': {'a': []}}, {'a': {'a': {}}}, {'a': {'a': $bag::[]}}, {'a': {'a': null}}]
output:[{'a': {'a': true}}, {'a': {'a': 5}}, {'a': {'a': "b"}}, {'a': {'a': $ion::{{}}}}, {'a': {'a': []}}, {'a': {'a': {}}}, {'a': {'a': $bag::[]}}, {'a': {'a': null}}]
}
},
// structs should be ordered by data types (DESC) (nulls first as default for desc)
Expand All @@ -96,7 +96,7 @@ edge_cases::[
assert:{
evalMode:[EvalModeCoerce, EvalModeError],
result:EvaluationSuccess,
output:[{'a': {'a': null}}, {'a': {'a': $bag::[]}}, {'a': {'a': {}}}, {'a': {'a': []}}, {'a': {'a': {{}}}}, {'a': {'a': "b"}}, {'a': {'a': 5}}, {'a': {'a': true}}]
output:[{'a': {'a': null}}, {'a': {'a': $bag::[]}}, {'a': {'a': {}}}, {'a': {'a': []}}, {'a': {'a': $ion::{{}}}}, {'a': {'a': "b"}}, {'a': {'a': 5}}, {'a': {'a': true}}]
}
},
]
6 changes: 3 additions & 3 deletions partiql-tests-data/eval/ion/query/select/from-clause.ion
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
evalMode:[EvalModeCoerce, EvalModeError],
result:EvaluationSuccess,
output:$bag::[
a,
b,
c
$ion::a,
$ion::b,
$ion::c
]
}
},
Expand Down
10 changes: 5 additions & 5 deletions partiql-tests-data/eval/ion/query/select/projection.ion
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
result:EvaluationSuccess,
output:$bag::[
{
_1:(
1
2
)
}
_1:$ion::1
},
{
_1:$ion::2
},
]
}
},
Expand Down
Loading