Spark: Add more tests for action alignment in MERGE#2185
Merged
aokolnychyi merged 2 commits intoapache:masterfrom Jan 29, 2021
Merged
Spark: Add more tests for action alignment in MERGE#2185aokolnychyi merged 2 commits intoapache:masterfrom
aokolnychyi merged 2 commits intoapache:masterfrom
Conversation
aokolnychyi
commented
Jan 29, 2021
| } | ||
|
|
||
| // TODO: tests for reordering when operations succeed (both insert and update actions) | ||
| // TODO: tests for subqueries in conditions |
Contributor
Author
There was a problem hiding this comment.
Subqueries were addressed earlier in this file.
Contributor
Author
rdblue
reviewed
Jan 29, 2021
spark3-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestMerge.java
Outdated
Show resolved
Hide resolved
rdblue
reviewed
Jan 29, 2021
| sql("MERGE INTO %s t USING source " + | ||
| "ON t.id == source.id " + | ||
| "WHEN MATCHED THEN " + | ||
| " UPDATE SET t.s = named_struct('c1', 100, 'c2', named_struct('a', array(1), 'm', map('x', 'y')))", tableName); |
Contributor
There was a problem hiding this comment.
Should we have a negative case for when the names are out of order or do not match?
Contributor
Author
There was a problem hiding this comment.
I think we already have a bunch of negative tests in this file below. For example, this point should be already covered by testMergeWithInvalidAssignments. Could you double-check if that's what you meant?
rdblue
approved these changes
Jan 29, 2021
Contributor
Author
|
Thanks for reviewing, @rdblue! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds more tests for
AssignmentAlignmentSupportthat previously required an actual implementation of MERGE.