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

[Iceberg]Fix flaky caused by rename view test #24292

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -157,16 +157,18 @@ public void testTableValidation()
@Test
public void testRenameView()
{
assertQuerySucceeds("CREATE TABLE iceberg.test_schema.iceberg_test_table (_string VARCHAR, _integer INTEGER)");
assertUpdate("CREATE VIEW iceberg.test_schema.test_view_to_be_renamed AS SELECT * FROM iceberg.test_schema.iceberg_test_table");
assertUpdate("ALTER VIEW IF EXISTS iceberg.test_schema.test_view_to_be_renamed RENAME TO iceberg.test_schema.test_view_renamed");
assertUpdate("CREATE VIEW iceberg.test_schema.test_view2_to_be_renamed AS SELECT * FROM iceberg.test_schema.iceberg_test_table");
assertUpdate("ALTER VIEW iceberg.test_schema.test_view2_to_be_renamed RENAME TO iceberg.test_schema.test_view2_renamed");
assertQuerySucceeds("SELECT * FROM iceberg.test_schema.test_view_renamed");
assertQuerySucceeds("SELECT * FROM iceberg.test_schema.test_view2_renamed");
assertUpdate("DROP VIEW iceberg.test_schema.test_view_renamed");
assertUpdate("DROP VIEW iceberg.test_schema.test_view2_renamed");
assertUpdate("DROP TABLE iceberg.test_schema.iceberg_test_table");
assertQuerySucceeds("CREATE SCHEMA iceberg.test_rename_view_schema");
assertQuerySucceeds("CREATE TABLE iceberg.test_rename_view_schema.iceberg_test_table (_string VARCHAR, _integer INTEGER)");
assertUpdate("CREATE VIEW iceberg.test_rename_view_schema.test_view_to_be_renamed AS SELECT * FROM iceberg.test_rename_view_schema.iceberg_test_table");
assertUpdate("ALTER VIEW IF EXISTS iceberg.test_rename_view_schema.test_view_to_be_renamed RENAME TO iceberg.test_rename_view_schema.test_view_renamed");
assertUpdate("CREATE VIEW iceberg.test_rename_view_schema.test_view2_to_be_renamed AS SELECT * FROM iceberg.test_rename_view_schema.iceberg_test_table");
assertUpdate("ALTER VIEW iceberg.test_rename_view_schema.test_view2_to_be_renamed RENAME TO iceberg.test_rename_view_schema.test_view2_renamed");
assertQuerySucceeds("SELECT * FROM iceberg.test_rename_view_schema.test_view_renamed");
assertQuerySucceeds("SELECT * FROM iceberg.test_rename_view_schema.test_view2_renamed");
assertUpdate("DROP VIEW iceberg.test_rename_view_schema.test_view_renamed");
assertUpdate("DROP VIEW iceberg.test_rename_view_schema.test_view2_renamed");
assertUpdate("DROP TABLE iceberg.test_rename_view_schema.iceberg_test_table");
assertQuerySucceeds("DROP SCHEMA IF EXISTS iceberg.test_rename_view_schema");
}
@Test
public void testRenameViewIfNotExists()
Expand Down
Loading