Skip to content

Commit

Permalink
Merge pull request #124 from partiql/main-fix-undefined-var
Browse files Browse the repository at this point in the history
Fixes undefined variable behavior tests
  • Loading branch information
johnedquinn authored Sep 12, 2024
2 parents 9ea5a46 + ffbb4e2 commit 132d681
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 26 deletions.
32 changes: 14 additions & 18 deletions partiql-tests-data/eval/query/group-by/group-by.ion
Original file line number Diff line number Diff line change
Expand Up @@ -982,9 +982,8 @@
result:EvaluationFail
},
{
result:EvaluationSuccess,
result:EvaluationFail,
evalMode:EvalModeCoerce,
output:$bag::[]
}
]
},
Expand All @@ -997,9 +996,8 @@
result:EvaluationFail
},
{
result:EvaluationSuccess,
result:EvaluationFail,
evalMode:EvalModeCoerce,
output:$bag::[]
}
]
},
Expand All @@ -1012,9 +1010,8 @@
result:EvaluationFail
},
{
result:EvaluationSuccess,
result:EvaluationFail,
evalMode:EvalModeCoerce,
output:$bag::[]
}
]
},
Expand All @@ -1027,9 +1024,8 @@
result:EvaluationFail
},
{
result:EvaluationSuccess,
result:EvaluationFail,
evalMode:EvalModeCoerce,
output:$bag::[]
}
]
}
Expand Down Expand Up @@ -7530,8 +7526,8 @@
}
},
{
name:"GROUP BY with JOIN : SELECT supplierName, COUNT(*) as the_count FROM suppliers AS s INNER JOIN products AS p ON s.supplierId = p.supplierId GROUP BY supplierName",
statement:"SELECT supplierName, COUNT(*) as the_count FROM suppliers AS s INNER JOIN products AS p ON s.supplierId = p.supplierId GROUP BY supplierName",
name:"GROUP BY with JOIN : SELECT supplierName, COUNT(*) as the_count FROM suppliers AS s INNER JOIN products AS p ON s.supplierId = p.supplierId GROUP BY s.supplierName",
statement:"SELECT supplierName, COUNT(*) as the_count FROM suppliers AS s INNER JOIN products AS p ON s.supplierId = p.supplierId GROUP BY s.supplierName",
assert:{
result:EvaluationSuccess,
evalMode:[
Expand Down Expand Up @@ -8166,8 +8162,8 @@
}
},
{
name:"SELECT col1, g FROM simple_1_col_1_group, join_me GROUP BY col1 GROUP AS g",
statement:"SELECT col1, g FROM simple_1_col_1_group, join_me GROUP BY col1 GROUP AS g",
name:"SELECT col1, g FROM simple_1_col_1_group, join_me GROUP BY simple_1_col_1_group.col1 GROUP AS g",
statement:"SELECT col1, g FROM simple_1_col_1_group, join_me GROUP BY simple_1_col_1_group.col1 GROUP AS g",
assert:{
result:EvaluationSuccess,
evalMode:[
Expand Down Expand Up @@ -8216,8 +8212,8 @@
}
},
{
name:"SELECT VALUE { 'col1': col1, 'g': g } FROM simple_1_col_1_group, join_me GROUP BY col1 GROUP AS g",
statement:"SELECT VALUE { 'col1': col1, 'g': g } FROM simple_1_col_1_group, join_me GROUP BY col1 GROUP AS g",
name:"SELECT VALUE { 'col1': col1, 'g': g } FROM simple_1_col_1_group, join_me GROUP BY simple_1_col_1_group.col1 GROUP AS g",
statement:"SELECT VALUE { 'col1': col1, 'g': g } FROM simple_1_col_1_group, join_me GROUP BY simple_1_col_1_group.col1 GROUP AS g",
assert:{
result:EvaluationSuccess,
evalMode:[
Expand Down Expand Up @@ -8266,8 +8262,8 @@
}
},
{
name:"SELECT col1, g FROM simple_1_col_1_group, different_types_per_row GROUP BY col1 GROUP AS g",
statement:"SELECT col1, g FROM simple_1_col_1_group, different_types_per_row GROUP BY col1 GROUP AS g",
name:"SELECT col1, g FROM simple_1_col_1_group, different_types_per_row GROUP BY simple_1_col_1_group.col1 GROUP AS g",
statement:"SELECT col1, g FROM simple_1_col_1_group, different_types_per_row GROUP BY simple_1_col_1_group.col1 GROUP AS g",
assert:{
result:EvaluationSuccess,
evalMode:[
Expand Down Expand Up @@ -8324,8 +8320,8 @@
}
},
{
name:"SELECT VALUE { 'col1': col1, 'g': g } FROM simple_1_col_1_group, different_types_per_row GROUP BY col1 GROUP AS g",
statement:"SELECT VALUE { 'col1': col1, 'g': g } FROM simple_1_col_1_group, different_types_per_row GROUP BY col1 GROUP AS g",
name:"SELECT VALUE { 'col1': col1, 'g': g } FROM simple_1_col_1_group, different_types_per_row GROUP BY simple_1_col_1_group.col1 GROUP AS g",
statement:"SELECT VALUE { 'col1': col1, 'g': g } FROM simple_1_col_1_group, different_types_per_row GROUP BY simple_1_col_1_group.col1 GROUP AS g",
assert:{
result:EvaluationSuccess,
evalMode:[
Expand Down
4 changes: 2 additions & 2 deletions partiql-tests-data/eval/query/select/select-mysql.ion
Original file line number Diff line number Diff line change
Expand Up @@ -11373,7 +11373,7 @@ select::[
},
{
name:"MYSQL_SELECT_20",
statement:"select fld3,period from t1,t2 where fld1 = 011401",
statement:"select t2.fld3,t1.period from t1,t2 where t2.fld1 = 011401",
assert:{
result:EvaluationSuccess,
evalMode:[
Expand All @@ -11390,7 +11390,7 @@ select::[
},
{
name:"MYSQL_SELECT_21",
statement:"select fld3,period from t2,t1 where companynr*10 = 37*10",
statement:"select t2.fld3,t1.period from t2,t1 where t2.companynr*10 = 37*10",
assert:{
result:EvaluationSuccess,
evalMode:[
Expand Down
9 changes: 3 additions & 6 deletions partiql-tests-data/eval/query/undefined-variable-behavior.ion
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ undefined_variable_behavior::[
assert:[
{
evalMode:EvalModeCoerce,
result:EvaluationSuccess,
output:$missing::null
result:EvaluationFail,
},
{
evalMode:EvalModeError,
Expand All @@ -24,8 +23,7 @@ undefined_variable_behavior::[
assert:[
{
evalMode:EvalModeCoerce,
result:EvaluationSuccess,
output:true
result:EvaluationFail,
},
{
evalMode:EvalModeError,
Expand All @@ -39,8 +37,7 @@ undefined_variable_behavior::[
assert:[
{
evalMode:EvalModeCoerce,
result:EvaluationSuccess,
output:true
result:EvaluationFail,
},
{
evalMode:EvalModeError,
Expand Down

0 comments on commit 132d681

Please sign in to comment.