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

Fix some more SQL set op + PartiQL bag op tests #121

Merged
merged 3 commits into from
Aug 21, 2024
Merged

Conversation

alancai98
Copy link
Member

@alancai98 alancai98 commented Aug 7, 2024

Issue #, if available:

Description of changes:

  • Fixes some more PartiQL bag op tests related to Fixes an outer union coercion test #120. Specifically for strict mode, error when an outer bag op argument is a non-collection
  • Also adds some PartiQL bag op parsing tests using ORDER BY, LIMIT, and OFFSET

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@alancai98 alancai98 self-assigned this Aug 7, 2024
@alancai98 alancai98 force-pushed the fix-set-ops branch 2 times, most recently from e08ad01 to aa2e51f Compare August 9, 2024 20:59
@@ -143,56 +143,204 @@ bagOperators::[
]
}
},
// outer union coercion
Copy link
Member Author

Choose a reason for hiding this comment

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

Tests from L146-346 do the following

  • For strict mode, give an error when coercing a non-collection
  • Adds INTERSECT and EXCEPT versions of the existing OUTER UNION tests

assert: {
result: SyntaxSuccess
}
},
{
Copy link
Member Author

Choose a reason for hiding this comment

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

Some additional PartiQL bag op tests to not allow for parsing of OUTER <set op> with ORDER BY, LIMIT, or OFFSET.

@alancai98 alancai98 marked this pull request as ready for review August 9, 2024 21:14
@alancai98 alancai98 changed the title [draft] Fix some more SQL set op + PartiQL bag op tests Fix some more SQL set op + PartiQL bag op tests Aug 9, 2024
@alancai98
Copy link
Member Author

From offline discussion, decided we shall allow for LIMIT, OFFSET, and ORDER BY to be applied to outer bag ops. And also modify the coercion logic for NULL and MISSING (i.e. wrap the absent value in a bag rather than empty bag). I will update the PR to reflect those changes.

@alancai98 alancai98 marked this pull request as draft August 14, 2024 00:57
@alancai98 alancai98 marked this pull request as ready for review August 15, 2024 23:50
@alancai98 alancai98 merged commit 87809f9 into main Aug 21, 2024
4 checks passed
@alancai98 alancai98 deleted the fix-set-ops branch August 21, 2024 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants