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

Fixes miscellaneous test cases #126

Merged
merged 2 commits into from
Aug 27, 2024
Merged
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
15 changes: 10 additions & 5 deletions partiql-tests-data/eval/query/pivot.ion
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,17 @@ pivot::[
{
name:"pivotBadFieldType",
statement:"PIVOT a.name AT i FROM animals AS a AT i",
assert:{
evalMode:[EvalModeCoerce, EvalModeError],
result:EvaluationSuccess,
output:{
assert: [
{
evalMode: EvalModeCoerce,
result: EvaluationSuccess,
output:{}
},
{
evalMode: EvalModeError,
result: EvaluationFail
Comment on lines +55 to +56
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Fails because it attempts to create tuples like {0: 'Kumo'} and 0 is an invalid type for the key of a struct.

}
}
]
},
{
name:"pivotUnpivotWithWhereOrderByLimit",
Expand Down
22 changes: 12 additions & 10 deletions partiql-tests-data/eval/query/select/projection.ion
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,25 @@
{
name:"projectionIterationBehaviorUnfiltered_select_list",
statement:"select x.someColumn from <<{'someColumn': MISSING}>> AS x",
assert:{
evalMode:[EvalModeCoerce, EvalModeError],
result:EvaluationSuccess,
output:$bag::[{}]
}
assert: [
{
evalMode: EvalModeCoerce,
result: EvaluationSuccess,
output: $bag::[{}]
},
{
evalMode: EvalModeError,
result: EvaluationFail
}
]
Comment on lines 26 to +37
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • This is equivalent to select x.someColumn from <<{}>> AS x, which should fail in type checking as per spec secion 4.1

},
{
name:"projectionIterationBehaviorUnfiltered_select_star",
statement:"select * from <<{'someColumn': MISSING}>>",
assert:{
evalMode:[EvalModeCoerce, EvalModeError],
result:EvaluationSuccess,
output:$bag::[
{
_1:{}
}
]
output:$bag::[ { } ]
}
}
Comment on lines 41 to 47
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • This is equivalent to select * from <<{}>>

]
Expand Down
Loading