From dbdc37b3ab32fc04ef0f0a81f4876194f83f7c35 Mon Sep 17 00:00:00 2001 From: Jan Was Date: Tue, 7 Jun 2022 11:00:58 +0200 Subject: [PATCH 1/3] Update Airbase to version 128 --- .../listagg/TestListaggAggregationFunction.java | 4 ++-- .../test/java/io/trino/sql/query/TestListagg.java | 12 ++++++------ .../trino/plugin/phoenix/TestingPhoenixServer.java | 3 +-- .../trino/plugin/phoenix5/TestingPhoenixServer.java | 3 +-- pom.xml | 4 ++-- 5 files changed, 12 insertions(+), 14 deletions(-) diff --git a/core/trino-main/src/test/java/io/trino/operator/aggregation/listagg/TestListaggAggregationFunction.java b/core/trino-main/src/test/java/io/trino/operator/aggregation/listagg/TestListaggAggregationFunction.java index dd87d06c7821..b256c5594705 100644 --- a/core/trino-main/src/test/java/io/trino/operator/aggregation/listagg/TestListaggAggregationFunction.java +++ b/core/trino-main/src/test/java/io/trino/operator/aggregation/listagg/TestListaggAggregationFunction.java @@ -22,11 +22,11 @@ import io.trino.spi.block.VariableWidthBlockBuilder; import io.trino.sql.analyzer.TypeSignatureProvider; import io.trino.sql.tree.QualifiedName; -import org.testcontainers.shaded.org.apache.commons.lang.StringUtils; import org.testng.annotations.Test; import java.util.List; +import static com.google.common.base.Strings.repeat; import static io.airlift.slice.Slices.utf8Slice; import static io.trino.block.BlockAssertions.createBooleansBlock; import static io.trino.block.BlockAssertions.createStringsBlock; @@ -82,7 +82,7 @@ public void testInputEmptyState() @Test public void testInputOverflowOverflowFillerTooLong() { - String overflowFillerTooLong = StringUtils.repeat(".", 65_537); + String overflowFillerTooLong = repeat(".", 65_537); SingleListaggAggregationState state = new SingleListaggAggregationState(); diff --git a/core/trino-main/src/test/java/io/trino/sql/query/TestListagg.java b/core/trino-main/src/test/java/io/trino/sql/query/TestListagg.java index 397a096fdfc6..8ea51adae77f 100644 --- a/core/trino-main/src/test/java/io/trino/sql/query/TestListagg.java +++ b/core/trino-main/src/test/java/io/trino/sql/query/TestListagg.java @@ -19,8 +19,8 @@ import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestInstance; -import org.testcontainers.shaded.org.apache.commons.lang.StringUtils; +import static com.google.common.base.Strings.repeat; import static io.trino.spi.StandardErrorCode.EXCEEDED_FUNCTION_MEMORY_LIMIT; import static io.trino.spi.block.PageBuilderStatus.DEFAULT_MAX_PAGE_SIZE_IN_BYTES; import static org.assertj.core.api.Assertions.assertThat; @@ -330,7 +330,7 @@ public void testListaggQueryWithOrderingAndGrouping() @Test public void testListaggQueryOverflowError() { - String tooLargeValue = StringUtils.repeat("a", DEFAULT_MAX_PAGE_SIZE_IN_BYTES); + String tooLargeValue = repeat("a", DEFAULT_MAX_PAGE_SIZE_IN_BYTES); assertThatThrownBy(() -> assertions.query( "SELECT LISTAGG(value, ',' ON OVERFLOW ERROR) WITHIN GROUP (ORDER BY value) " + "FROM (VALUES '" + tooLargeValue + "','Trino') t(value) ")) @@ -342,7 +342,7 @@ public void testListaggQueryOverflowError() @Test public void testListaggQueryOverflowErrorGrouping() { - String tooLargeValue = StringUtils.repeat("a", DEFAULT_MAX_PAGE_SIZE_IN_BYTES); + String tooLargeValue = repeat("a", DEFAULT_MAX_PAGE_SIZE_IN_BYTES); assertThatThrownBy(() -> assertions.query( "SELECT id, LISTAGG(value, ',' ON OVERFLOW ERROR) WITHIN GROUP (ORDER BY value) " + "FROM (VALUES " + @@ -360,7 +360,7 @@ public void testListaggQueryOverflowErrorGrouping() @Test public void testListaggQueryOverflowTruncateWithoutCountAndWithoutOverflowFiller() { - String largeValue = StringUtils.repeat("a", DEFAULT_MAX_PAGE_SIZE_IN_BYTES - 6); + String largeValue = repeat("a", DEFAULT_MAX_PAGE_SIZE_IN_BYTES - 6); assertThat(assertions.query( "SELECT LISTAGG(value, ',' ON OVERFLOW TRUNCATE WITHOUT COUNT) WITHIN GROUP (ORDER BY value) " + "FROM (VALUES '" + largeValue + "', 'trino', 'rocks') t(value) ")) @@ -370,7 +370,7 @@ public void testListaggQueryOverflowTruncateWithoutCountAndWithoutOverflowFiller @Test public void testListaggQueryOverflowTruncateWithCountAndWithOverflowFiller() { - String largeValue = StringUtils.repeat("a", DEFAULT_MAX_PAGE_SIZE_IN_BYTES - 12); + String largeValue = repeat("a", DEFAULT_MAX_PAGE_SIZE_IN_BYTES - 12); assertThat(assertions.query( "SELECT LISTAGG(value, ',' ON OVERFLOW TRUNCATE '.....' WITH COUNT) WITHIN GROUP (ORDER BY value) " + "FROM (VALUES '" + largeValue + "', 'trino', 'sql', 'everything') t(value) ")) @@ -380,7 +380,7 @@ public void testListaggQueryOverflowTruncateWithCountAndWithOverflowFiller() @Test public void testListaggQueryGroupingOverflowTruncateWithCountAndWithOverflowFiller() { - String largeValue = StringUtils.repeat("a", DEFAULT_MAX_PAGE_SIZE_IN_BYTES - 12); + String largeValue = repeat("a", DEFAULT_MAX_PAGE_SIZE_IN_BYTES - 12); assertThat(assertions.query( "SELECT id, LISTAGG(value, ',' ON OVERFLOW TRUNCATE '.....' WITH COUNT) WITHIN GROUP (ORDER BY value) " + "FROM (VALUES " + diff --git a/plugin/trino-phoenix/src/test/java/io/trino/plugin/phoenix/TestingPhoenixServer.java b/plugin/trino-phoenix/src/test/java/io/trino/plugin/phoenix/TestingPhoenixServer.java index b15fcd5d65cd..479017061187 100644 --- a/plugin/trino-phoenix/src/test/java/io/trino/plugin/phoenix/TestingPhoenixServer.java +++ b/plugin/trino-phoenix/src/test/java/io/trino/plugin/phoenix/TestingPhoenixServer.java @@ -19,7 +19,6 @@ import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.hbase.MiniHBaseCluster; import org.apache.hadoop.hbase.zookeeper.MiniZooKeeperCluster; -import org.apache.phoenix.shaded.org.apache.zookeeper.server.ZooKeeperServer; import javax.annotation.concurrent.GuardedBy; @@ -79,7 +78,7 @@ private TestingPhoenixServer() // keep references to prevent GC from resetting the log levels apacheLogger = java.util.logging.Logger.getLogger("org.apache"); apacheLogger.setLevel(Level.SEVERE); - zookeeperLogger = java.util.logging.Logger.getLogger(ZooKeeperServer.class.getName()); + zookeeperLogger = java.util.logging.Logger.getLogger("org.apache.phoenix.shaded.org.apache.zookeeper.server.ZooKeeperServer"); zookeeperLogger.setLevel(Level.OFF); securityLogger = java.util.logging.Logger.getLogger("SecurityLogger.org.apache"); securityLogger.setLevel(Level.SEVERE); diff --git a/plugin/trino-phoenix5/src/test/java/io/trino/plugin/phoenix5/TestingPhoenixServer.java b/plugin/trino-phoenix5/src/test/java/io/trino/plugin/phoenix5/TestingPhoenixServer.java index 3b8fcd6e10e0..3bfd777fc8a7 100644 --- a/plugin/trino-phoenix5/src/test/java/io/trino/plugin/phoenix5/TestingPhoenixServer.java +++ b/plugin/trino-phoenix5/src/test/java/io/trino/plugin/phoenix5/TestingPhoenixServer.java @@ -19,7 +19,6 @@ import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.hbase.MiniHBaseCluster; import org.apache.hadoop.hbase.zookeeper.MiniZooKeeperCluster; -import org.apache.phoenix.shaded.org.apache.zookeeper.server.ZooKeeperServer; import javax.annotation.concurrent.GuardedBy; @@ -79,7 +78,7 @@ private TestingPhoenixServer() // keep references to prevent GC from resetting the log levels apacheLogger = java.util.logging.Logger.getLogger("org.apache"); apacheLogger.setLevel(Level.SEVERE); - zookeeperLogger = java.util.logging.Logger.getLogger(ZooKeeperServer.class.getName()); + zookeeperLogger = java.util.logging.Logger.getLogger("org.apache.phoenix.shaded.org.apache.zookeeper.server.ZooKeeperServer"); zookeeperLogger.setLevel(Level.OFF); securityLogger = java.util.logging.Logger.getLogger("SecurityLogger.org.apache"); securityLogger.setLevel(Level.SEVERE); diff --git a/pom.xml b/pom.xml index f4fb496ef466..59aabcf1a248 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ io.airlift airbase - 123 + 128 io.trino @@ -1678,7 +1678,7 @@ org.yaml snakeyaml - 1.28 + 1.30 From 17d4f34fd441e4cdf4cbe1093c4ad545b670068d Mon Sep 17 00:00:00 2001 From: Jan Was Date: Wed, 13 Apr 2022 09:03:18 +0200 Subject: [PATCH 2/3] Restore default order of test execution --- plugin/trino-delta-lake/pom.xml | 9 --------- plugin/trino-pinot/pom.xml | 7 ------- plugin/trino-sqlserver/pom.xml | 9 --------- testing/trino-tests/pom.xml | 10 ---------- 4 files changed, 35 deletions(-) diff --git a/plugin/trino-delta-lake/pom.xml b/plugin/trino-delta-lake/pom.xml index 650984897b39..1cb5dca69fcf 100644 --- a/plugin/trino-delta-lake/pom.xml +++ b/plugin/trino-delta-lake/pom.xml @@ -15,15 +15,6 @@ ${project.parent.basedir} - - - instances diff --git a/plugin/trino-pinot/pom.xml b/plugin/trino-pinot/pom.xml index 4727c581d591..cf3d2a596874 100755 --- a/plugin/trino-pinot/pom.xml +++ b/plugin/trino-pinot/pom.xml @@ -15,13 +15,6 @@ ${project.parent.basedir} 0.10.0 - - instances diff --git a/plugin/trino-sqlserver/pom.xml b/plugin/trino-sqlserver/pom.xml index bbe6890f77c5..15556c4cdbe3 100644 --- a/plugin/trino-sqlserver/pom.xml +++ b/plugin/trino-sqlserver/pom.xml @@ -15,15 +15,6 @@ ${project.parent.basedir} - - - instances diff --git a/testing/trino-tests/pom.xml b/testing/trino-tests/pom.xml index 3144f10c1e33..d0468407632b 100644 --- a/testing/trino-tests/pom.xml +++ b/testing/trino-tests/pom.xml @@ -14,16 +14,6 @@ ${project.parent.basedir} - - - instances From bd4498a14f3ce409cc7c003cdc7e9cf8db2696e0 Mon Sep 17 00:00:00 2001 From: Jan Was Date: Thu, 9 Jun 2022 10:20:43 +0200 Subject: [PATCH 3/3] drop! Test a snapshot of Airbase --- pom.xml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 59aabcf1a248..a337287dadf8 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ io.airlift airbase - 128 + 126-SNAPSHOT io.trino @@ -174,6 +174,20 @@ testing/trino-tests + + + + oss.sonatype.org-snapshot + https://oss.sonatype.org/content/repositories/snapshots + + false + + + true + + + +