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

Reduce resource utilization in TestHiveIntegrationSmokeTest #24817

Merged
merged 1 commit into from
Mar 27, 2025
Merged
Show file tree
Hide file tree
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
4 changes: 1 addition & 3 deletions presto-hive/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

<properties>
<air.main.basedir>${project.parent.basedir}</air.main.basedir>
<air.test.jvmsize>5g</air.test.jvmsize>
</properties>

<dependencies>
Expand Down Expand Up @@ -630,9 +631,6 @@
</profile>
<profile>
<id>test-hive-pushdown-filter-queries-basic</id>
<properties>
<air.test.jvmsize>5g</air.test.jvmsize>
</properties>
<build>
<plugins>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2382,23 +2382,23 @@ private void testWriteSortedTable(Session session)
session,
"CREATE TABLE create_partitioned_sorted_table (orderkey, custkey, totalprice, orderdate, orderpriority, clerk, shippriority, comment, orderstatus)\n" +
"WITH (partitioned_by = ARRAY['orderstatus'], bucketed_by = ARRAY['custkey'], bucket_count = 11, sorted_by = ARRAY['orderkey']) AS\n" +
"SELECT orderkey, custkey, totalprice, orderdate, orderpriority, clerk, shippriority, comment, orderstatus FROM tpch.sf1.orders",
(long) computeActual("SELECT count(*) FROM tpch.sf1.orders").getOnlyValue());
"SELECT orderkey, custkey, totalprice, orderdate, orderpriority, clerk, shippriority, comment, orderstatus FROM tpch.tiny.orders",
(long) computeActual("SELECT count(*) FROM tpch.tiny.orders").getOnlyValue());
assertQuery(
session,
"SELECT count(*) FROM create_partitioned_sorted_table",
"SELECT count(*) * 100 FROM orders");
"SELECT count(*) FROM orders");

assertUpdate(
session,
"CREATE TABLE create_unpartitioned_sorted_table (orderkey, custkey, totalprice, orderdate, orderpriority, clerk, shippriority, comment, orderstatus)\n" +
"WITH (bucketed_by = ARRAY['custkey'], bucket_count = 11, sorted_by = ARRAY['orderkey']) AS\n" +
"SELECT orderkey, custkey, totalprice, orderdate, orderpriority, clerk, shippriority, comment, orderstatus FROM tpch.sf1.orders",
(long) computeActual("SELECT count(*) FROM tpch.sf1.orders").getOnlyValue());
"SELECT orderkey, custkey, totalprice, orderdate, orderpriority, clerk, shippriority, comment, orderstatus FROM tpch.tiny.orders",
(long) computeActual("SELECT count(*) FROM tpch.tiny.orders").getOnlyValue());
assertQuery(
session,
"SELECT count(*) FROM create_unpartitioned_sorted_table",
"SELECT count(*) * 100 FROM orders");
"SELECT count(*) FROM orders");

// insert
assertUpdate(
Expand All @@ -2409,12 +2409,12 @@ private void testWriteSortedTable(Session session)
assertUpdate(
session,
"INSERT INTO insert_partitioned_sorted_table\n" +
"SELECT orderkey, custkey, totalprice, orderdate, orderpriority, clerk, shippriority, comment, orderstatus FROM tpch.sf1.orders",
(long) computeActual("SELECT count(*) FROM tpch.sf1.orders").getOnlyValue());
"SELECT orderkey, custkey, totalprice, orderdate, orderpriority, clerk, shippriority, comment, orderstatus FROM tpch.tiny.orders",
(long) computeActual("SELECT count(*) FROM tpch.tiny.orders").getOnlyValue());
assertQuery(
session,
"SELECT count(*) FROM insert_partitioned_sorted_table",
"SELECT count(*) * 100 FROM orders");
"SELECT count(*) FROM orders");
}
finally {
assertUpdate(session, "DROP TABLE IF EXISTS create_partitioned_sorted_table");
Expand All @@ -2441,23 +2441,23 @@ public void testWritePreferredOrderingTable(Session session)
session,
"CREATE TABLE create_partitioned_ordering_table (orderkey, custkey, totalprice, orderdate, orderpriority, clerk, shippriority, comment, orderstatus)\n" +
"WITH (partitioned_by = ARRAY['orderstatus'], preferred_ordering_columns = ARRAY['orderkey']) AS\n" +
"SELECT orderkey, custkey, totalprice, orderdate, orderpriority, clerk, shippriority, comment, orderstatus FROM tpch.sf1.orders",
(long) computeActual("SELECT count(*) FROM tpch.sf1.orders").getOnlyValue());
"SELECT orderkey, custkey, totalprice, orderdate, orderpriority, clerk, shippriority, comment, orderstatus FROM tpch.tiny.orders",
(long) computeActual("SELECT count(*) FROM tpch.tiny.orders").getOnlyValue());
assertQuery(
session,
"SELECT count(*) FROM create_partitioned_ordering_table",
"SELECT count(*) * 100 FROM orders");
"SELECT count(*) FROM orders");

assertUpdate(
session,
"CREATE TABLE create_unpartitioned_ordering_table (orderkey, custkey, totalprice, orderdate, orderpriority, clerk, shippriority, comment, orderstatus)\n" +
"WITH (preferred_ordering_columns = ARRAY['orderkey']) AS\n" +
"SELECT orderkey, custkey, totalprice, orderdate, orderpriority, clerk, shippriority, comment, orderstatus FROM tpch.sf1.orders",
(long) computeActual("SELECT count(*) FROM tpch.sf1.orders").getOnlyValue());
"SELECT orderkey, custkey, totalprice, orderdate, orderpriority, clerk, shippriority, comment, orderstatus FROM tpch.tiny.orders",
(long) computeActual("SELECT count(*) FROM tpch.tiny.orders").getOnlyValue());
assertQuery(
session,
"SELECT count(*) FROM create_unpartitioned_ordering_table",
"SELECT count(*) * 100 FROM orders");
"SELECT count(*) FROM orders");

// insert
assertUpdate(
Expand All @@ -2468,12 +2468,12 @@ public void testWritePreferredOrderingTable(Session session)
assertUpdate(
session,
"INSERT INTO insert_partitioned_ordering_table\n" +
"SELECT orderkey, custkey, totalprice, orderdate, orderpriority, clerk, shippriority, comment, orderstatus FROM tpch.sf1.orders",
(long) computeActual("SELECT count(*) FROM tpch.sf1.orders").getOnlyValue());
"SELECT orderkey, custkey, totalprice, orderdate, orderpriority, clerk, shippriority, comment, orderstatus FROM tpch.tiny.orders",
(long) computeActual("SELECT count(*) FROM tpch.tiny.orders").getOnlyValue());
assertQuery(
session,
"SELECT count(*) FROM insert_partitioned_ordering_table",
"SELECT count(*) * 100 FROM orders");
"SELECT count(*) FROM orders");

// invalid
assertQueryFails(
Expand Down Expand Up @@ -2644,8 +2644,8 @@ public void testFileRenamingForPartitionedTable()
.build(),
"CREATE TABLE partitioned_ordering_table (orderkey, custkey, totalprice, orderdate, orderpriority, clerk, shippriority, comment, orderstatus)\n" +
"WITH (partitioned_by = ARRAY['orderstatus'], preferred_ordering_columns = ARRAY['orderkey']) AS\n" +
"SELECT orderkey, custkey, totalprice, orderdate, orderpriority, clerk, shippriority, comment, orderstatus FROM tpch.sf1.orders",
(long) computeActual("SELECT count(*) FROM tpch.sf1.orders").getOnlyValue());
"SELECT orderkey, custkey, totalprice, orderdate, orderpriority, clerk, shippriority, comment, orderstatus FROM tpch.tiny.orders",
(long) computeActual("SELECT count(*) FROM tpch.tiny.orders").getOnlyValue());

// Collect all file names
Map<String, List<Integer>> partitionFileNamesMap = new HashMap<>();
Expand Down Expand Up @@ -2683,8 +2683,8 @@ public void testFileRenamingForUnpartitionedTable()
.setSystemProperty("writer_min_size", "1MB")
.setSystemProperty("task_writer_count", "1")
.build(),
"CREATE TABLE unpartitioned_ordering_table AS SELECT * FROM tpch.sf1.orders",
(long) computeActual("SELECT count(*) FROM tpch.sf1.orders").getOnlyValue());
"CREATE TABLE unpartitioned_ordering_table AS SELECT * FROM tpch.tiny.orders",
(long) computeActual("SELECT count(*) FROM tpch.tiny.orders").getOnlyValue());

// Collect file names of the table
List<Integer> fileNames = new ArrayList<>();
Expand Down
Loading