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

Populate the test data in a single query #8301

Closed

Conversation

Praveen2112
Copy link
Member

@Praveen2112 Praveen2112 commented Jun 17, 2021

No description provided.

Copy link
Contributor

@ksobolew ksobolew left a 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)

@@ -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));
Copy link
Member

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?

Copy link
Member Author

@Praveen2112 Praveen2112 Jun 17, 2021

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.

Copy link
Member Author

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)

Copy link
Member Author

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.

@findepi
Copy link
Member

findepi commented Jun 17, 2021

Fixes #8268

@Praveen2112 remove this from the issue PR description.
it doesn't seem to be fixing the underling problem, it only changes existing tests in a way that they do not hit the underlying problem

@Praveen2112 Praveen2112 force-pushed the praveen/081/hive_fix_3 branch from 0842809 to 059993a Compare June 17, 2021 15:48
@Praveen2112 Praveen2112 force-pushed the praveen/081/hive_fix_3 branch from 059993a to abb35e8 Compare June 17, 2021 15:50
@Praveen2112
Copy link
Member Author

@findepi AC. Please let me know if there is any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants