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

Fix Flaky BaseHiveConnectorTest.testMultipleWritersWithSkewedData #20163

Merged
merged 1 commit into from
Dec 19, 2023
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 @@ -4137,19 +4137,19 @@ public void testMultipleWriters()
public void testMultipleWritersWithSkewedData()
{
try {
// We need to use large table (sf2) to see the effect. Otherwise, a single writer will write the entire
// We need to use large table (sf1) to see the effect. Otherwise, a single writer will write the entire
// data before ScaledWriterScheduler is able to scale it to multiple machines.
// Skewed table that will scale writers to multiple machines.
String selectSql = "SELECT t1.* FROM (SELECT *, case when orderkey >= 0 then 1 else orderkey end as join_key FROM tpch.sf2.orders) t1 " +
"INNER JOIN (SELECT orderkey FROM tpch.sf2.orders) t2 " +
String selectSql = "SELECT t1.* FROM (SELECT *, case when orderkey >= 0 then 1 else orderkey end as join_key FROM tpch.sf1.orders) t1 " +
"INNER JOIN (SELECT orderkey FROM tpch.sf1.orders) t2 " +
"ON t1.join_key = t2.orderkey";
@Language("SQL") String createTableSql = "CREATE TABLE scale_writers_skewed WITH (format = 'PARQUET') AS " + selectSql;
assertUpdate(
Session.builder(getSession())
.setSystemProperty("task_min_writer_count", "1")
.setSystemProperty("scale_writers", "true")
.setSystemProperty("task_scale_writers_enabled", "false")
.setSystemProperty("writer_scaling_min_data_processed", "1MB")
.setSystemProperty("writer_scaling_min_data_processed", "0.5MB")
.setSystemProperty("join_distribution_type", "PARTITIONED")
.build(),
createTableSql,
Expand Down
Loading