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

Change table name in Hive testMismatchedBucketWithBucketPredicate #12471

Merged
merged 1 commit into from
May 19, 2022
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 @@ -4642,16 +4642,16 @@ public void testPredicatePushDownToTableScan()
@Test
public void testMismatchedBucketWithBucketPredicate()
{
assertUpdate("DROP TABLE IF EXISTS test_mismatch_bucketing8");
assertUpdate("DROP TABLE IF EXISTS test_mismatch_bucketing32");
assertUpdate("DROP TABLE IF EXISTS test_mismatch_bucketing_with_bucket_predicate8");
assertUpdate("DROP TABLE IF EXISTS test_mismatch_bucketing_with_bucket_predicate32");

assertUpdate(
"CREATE TABLE test_mismatch_bucketing8 " +
"CREATE TABLE test_mismatch_bucketing_with_bucket_predicate8 " +
"WITH (bucket_count = 8, bucketed_by = ARRAY['key8']) AS " +
"SELECT nationkey key8, comment value8 FROM nation",
25);
assertUpdate(
"CREATE TABLE test_mismatch_bucketing32 " +
"CREATE TABLE test_mismatch_bucketing_with_bucket_predicate32 " +
"WITH (bucket_count = 32, bucketed_by = ARRAY['key32']) AS " +
"SELECT nationkey key32, comment value32 FROM nation",
25);
Expand All @@ -4666,17 +4666,17 @@ public void testMismatchedBucketWithBucketPredicate()
@Language("SQL") String query = "SELECT count(*) AS count " +
"FROM (" +
" SELECT key32" +
" FROM test_mismatch_bucketing32" +
" FROM test_mismatch_bucketing_with_bucket_predicate32" +
" WHERE \"$bucket\" between 16 AND 31" +
") a " +
"JOIN test_mismatch_bucketing8 b " +
"JOIN test_mismatch_bucketing_with_bucket_predicate8 b " +
"ON a.key32 = b.key8";

assertQuery(withMismatchOptimization, query, "SELECT 9");
assertQuery(withoutMismatchOptimization, query, "SELECT 9");

assertUpdate("DROP TABLE IF EXISTS test_mismatch_bucketing8");
assertUpdate("DROP TABLE IF EXISTS test_mismatch_bucketing32");
assertUpdate("DROP TABLE IF EXISTS test_mismatch_bucketing_with_bucket_predicate8");
assertUpdate("DROP TABLE IF EXISTS test_mismatch_bucketing_with_bucket_predicate32");
}

@DataProvider
Expand Down