-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Fix reading from Delta in a transaction #11792
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -492,6 +492,16 @@ public void testSelectAll() | |
| assertQuery("SELECT * FROM orders"); | ||
| } | ||
|
|
||
| @Test | ||
| public void testSelectInTransaction() | ||
| { | ||
| inTransaction(session -> { | ||
| assertQuery(session, "SELECT nationkey, name, regionkey FROM nation"); | ||
| assertQuery(session, "SELECT regionkey, name FROM region"); | ||
| assertQuery(session, "SELECT nationkey, name, regionkey FROM nation"); | ||
| }); | ||
| } | ||
|
|
||
| /** | ||
| * Test interactions between optimizer (including CBO), scheduling and connector metadata APIs. | ||
| */ | ||
|
|
@@ -2359,6 +2369,22 @@ protected String errorMessageForInsertIntoNotNullColumn(String columnName) | |
| throw new UnsupportedOperationException("This method should be overridden"); | ||
| } | ||
|
|
||
| @Test | ||
| public void testInsertInTransaction() | ||
| { | ||
| skipTestUnless(hasBehavior(SUPPORTS_INSERT)); | ||
| skipTestUnless(hasBehavior(SUPPORTS_MULTI_STATEMENT_WRITES)); // covered by testWriteNotAllowedInTransaction | ||
|
|
||
| try (TestTable table = new TestTable( | ||
| getQueryRunner()::execute, | ||
| "test_tx_insert", | ||
| "(a bigint)")) { | ||
| String tableName = table.getName(); | ||
| inTransaction(session -> assertUpdate(session, "INSERT INTO " + tableName + " VALUES 42", 1)); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. just to make sure, this would work without your change(removing that 'verify') right?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for Detla, the test would break at the |
||
| assertQuery("TABLE " + tableName, "VALUES 42"); | ||
| } | ||
| } | ||
|
|
||
| @Test | ||
| public void testDelete() | ||
| { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.