Skip to content

Commit

Permalink
Fixes cast conformance tests
Browse files Browse the repository at this point in the history
  • Loading branch information
johnedquinn committed Jul 24, 2024
1 parent daf9234 commit 07b224a
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions partiql-tests-data/eval/primitives/cast.ion
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,22 @@
name:"cast to MISSING valid cases{value:\"NULL\"}",
statement:"cast(NULL as MISSING)",
assert:{
result:EvaluationSuccess,
result:EvaluationFail,
evalMode:[
EvalModeCoerce,
EvalModeError
],
output:$missing::null
}
},
{
name:"cast to MISSING valid cases{value:\"MISSING\"}",
statement:"cast(MISSING as MISSING)",
assert:{
result:EvaluationSuccess,
result:EvaluationFail,
evalMode:[
EvalModeCoerce,
EvalModeError
],
output:$missing::null
}
}
]
Expand Down Expand Up @@ -88,7 +86,7 @@
},
{
name:"cast to int valid cases{value:\"9223372036854775807\",result:9223372036854775807}",
statement:"cast(9223372036854775807 as INT)",
statement:"cast(9223372036854775807 as BIGINT)",
assert:{
result:EvaluationSuccess,
evalMode:[
Expand All @@ -100,7 +98,7 @@
},
{
name:"cast to int valid cases{value:\"-9223372036854775808\",result:-9223372036854775808}",
statement:"cast(-9223372036854775808 as INT)",
statement:"cast(-9223372036854775808 as BIGINT)",
assert:{
result:EvaluationSuccess,
evalMode:[
Expand All @@ -112,7 +110,7 @@
},
{
name:"cast to int valid cases{value:\"`-9223372036854775808e0`\",result:-9223372036854775808}",
statement:"cast(`-9223372036854775808e0` as INT)",
statement:"cast(`-9223372036854775808e0` as BIGINT)",
assert:{
result:EvaluationSuccess,
evalMode:[
Expand All @@ -124,7 +122,7 @@
},
{
name:"cast to int valid cases{value:\"9223372036854775807.0\",result:9223372036854775807}",
statement:"cast(9223372036854775807.0 as INT)",
statement:"cast(9223372036854775807.0 as BIGINT)",
assert:{
result:EvaluationSuccess,
evalMode:[
Expand All @@ -136,7 +134,7 @@
},
{
name:"cast to int valid cases{value:\"-9223372036854775808.0\",result:-9223372036854775808}",
statement:"cast(-9223372036854775808.0 as INT)",
statement:"cast(-9223372036854775808.0 as BIGINT)",
assert:{
result:EvaluationSuccess,
evalMode:[
Expand Down Expand Up @@ -477,24 +475,22 @@
name:"cast to NULL valid cases{value:\"NULL\"}",
statement:"cast(NULL as NULL)",
assert:{
result:EvaluationSuccess,
result:EvaluationFail,
evalMode:[
EvalModeCoerce,
EvalModeError
],
output:null
}
},
{
name:"cast to NULL valid cases{value:\"MISSING\"}",
statement:"cast(MISSING as NULL)",
assert:{
result:EvaluationSuccess,
result:EvaluationFail,
evalMode:[
EvalModeCoerce,
EvalModeError
],
output:null
}
}
]
Expand Down

0 comments on commit 07b224a

Please sign in to comment.