Skip to content

Commit

Permalink
Use sf1 table for testMultipleWritersWithSkewedData
Browse files Browse the repository at this point in the history
  • Loading branch information
gaurav8297 authored and sopel39 committed Dec 19, 2023
1 parent 81ea011 commit 40117ea
Showing 1 changed file with 4 additions and 4 deletions.
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

0 comments on commit 40117ea

Please sign in to comment.