-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Populate the test data in a single query #8301
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (assuming the test passes)
...rino-product-tests/src/main/java/io/trino/tests/product/hive/TestHiveTransactionalTable.java
Show resolved
Hide resolved
@@ -1401,8 +1401,7 @@ public void testAcidUpdateWithSubqueryAssignment() | |||
// TODO support UPDATE with correlated subquery in assignment | |||
withTemporaryTable("test_update_subquery", true, false, NONE, tableName -> { | |||
onTrino().executeQuery(format("CREATE TABLE %s (column1 INT, column2 varchar) WITH (transactional = true)", tableName)); | |||
onTrino().executeQuery(format("INSERT INTO %s VALUES (1, 'x')", tableName)); | |||
onTrino().executeQuery(format("INSERT INTO %s VALUES (2, 'y')", tableName)); | |||
onTrino().executeQuery(format("INSERT INTO %s VALUES (1, 'x'), (2, 'y')", tableName)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Praveen2112 do you understand why INSERT-ing two rows at once avoids #8268 while two separate INSERTs followed up UPDATEs lead to a failure on Hive side?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still investigating on why it works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is why it works - #8268 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we run the inserts in a same query - single delta file is created and delete information are properly mapped to the file (since they have different rowId) thus it works.
@Praveen2112 remove this from the |
0842809
to
059993a
Compare
This fixes error when reading table from Hive. Ref: https://issues.apache.org/jira/browse/HIVE-22318
059993a
to
abb35e8
Compare
@findepi AC. Please let me know if there is any issues. |
No description provided.