This is an automated email from the ASF dual-hosted git repository.
lzljs3620320 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-paimon-presto.git
The following commit(s) were added to refs/heads/main by this push:
new 59b9e60 feature-adj-ut-order (#22)
59b9e60 is described below
commit 59b9e60f0294f54189378555303900654c1f8229
Author: chendapao <[email protected]>
AuthorDate: Sat Nov 25 14:25:30 2023 +0800
feature-adj-ut-order (#22)
---
.../test/java/org/apache/paimon/presto/TestPrestoITCase.java | 10 +++++++++-
.../test/java/org/apache/paimon/presto/TestPrestoITCase.java | 10 +++++++++-
.../test/java/org/apache/paimon/presto/TestPrestoITCase.java | 12 ++++++++++--
.../org/apache/paimon/prestosql/TestPrestoSqlITCase.java | 10 +++++++++-
.../java/org/apache/paimon/prestosql/TestPrestoSqlTCase.java | 10 +++++++++-
5 files changed, 46 insertions(+), 6 deletions(-)
diff --git
a/paimon-presto-0.236/src/test/java/org/apache/paimon/presto/TestPrestoITCase.java
b/paimon-presto-0.236/src/test/java/org/apache/paimon/presto/TestPrestoITCase.java
index 672a402..46dc6f2 100644
---
a/paimon-presto-0.236/src/test/java/org/apache/paimon/presto/TestPrestoITCase.java
+++
b/paimon-presto-0.236/src/test/java/org/apache/paimon/presto/TestPrestoITCase.java
@@ -40,6 +40,7 @@ import org.apache.paimon.types.VarCharType;
import com.facebook.presto.testing.MaterializedResult;
import com.facebook.presto.testing.QueryRunner;
import com.facebook.presto.tests.DistributedQueryRunner;
+import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import java.nio.file.Files;
@@ -57,6 +58,8 @@ import static org.assertj.core.api.Assertions.assertThat;
/** ITCase for presto connector. */
public class TestPrestoITCase {
+ private QueryRunner queryRunner;
+
private static final String CATALOG = "paimon";
private static final String DB = "default";
@@ -173,6 +176,11 @@ public class TestPrestoITCase {
return new SimpleTableTestHelper(tablePath, rowType);
}
+ @BeforeTest
+ public void init() throws Exception {
+ queryRunner = createQueryRunner();
+ }
+
@Test
public void testComplexTypes() throws Exception {
assertThat(sql("SELECT * FROM paimon.default.t4")).isEqualTo("[[1,
{1=2}]]");
@@ -216,7 +224,7 @@ public class TestPrestoITCase {
}
private String sql(String sql) throws Exception {
- MaterializedResult result = createQueryRunner().execute(sql);
+ MaterializedResult result = queryRunner.execute(sql);
return result.getMaterializedRows().toString();
}
}
diff --git
a/paimon-presto-0.268/src/test/java/org/apache/paimon/presto/TestPrestoITCase.java
b/paimon-presto-0.268/src/test/java/org/apache/paimon/presto/TestPrestoITCase.java
index 672a402..46dc6f2 100644
---
a/paimon-presto-0.268/src/test/java/org/apache/paimon/presto/TestPrestoITCase.java
+++
b/paimon-presto-0.268/src/test/java/org/apache/paimon/presto/TestPrestoITCase.java
@@ -40,6 +40,7 @@ import org.apache.paimon.types.VarCharType;
import com.facebook.presto.testing.MaterializedResult;
import com.facebook.presto.testing.QueryRunner;
import com.facebook.presto.tests.DistributedQueryRunner;
+import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import java.nio.file.Files;
@@ -57,6 +58,8 @@ import static org.assertj.core.api.Assertions.assertThat;
/** ITCase for presto connector. */
public class TestPrestoITCase {
+ private QueryRunner queryRunner;
+
private static final String CATALOG = "paimon";
private static final String DB = "default";
@@ -173,6 +176,11 @@ public class TestPrestoITCase {
return new SimpleTableTestHelper(tablePath, rowType);
}
+ @BeforeTest
+ public void init() throws Exception {
+ queryRunner = createQueryRunner();
+ }
+
@Test
public void testComplexTypes() throws Exception {
assertThat(sql("SELECT * FROM paimon.default.t4")).isEqualTo("[[1,
{1=2}]]");
@@ -216,7 +224,7 @@ public class TestPrestoITCase {
}
private String sql(String sql) throws Exception {
- MaterializedResult result = createQueryRunner().execute(sql);
+ MaterializedResult result = queryRunner.execute(sql);
return result.getMaterializedRows().toString();
}
}
diff --git
a/paimon-presto-common/src/test/java/org/apache/paimon/presto/TestPrestoITCase.java
b/paimon-presto-common/src/test/java/org/apache/paimon/presto/TestPrestoITCase.java
index 672a402..aa409f8 100644
---
a/paimon-presto-common/src/test/java/org/apache/paimon/presto/TestPrestoITCase.java
+++
b/paimon-presto-common/src/test/java/org/apache/paimon/presto/TestPrestoITCase.java
@@ -40,6 +40,7 @@ import org.apache.paimon.types.VarCharType;
import com.facebook.presto.testing.MaterializedResult;
import com.facebook.presto.testing.QueryRunner;
import com.facebook.presto.tests.DistributedQueryRunner;
+import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import java.nio.file.Files;
@@ -57,6 +58,8 @@ import static org.assertj.core.api.Assertions.assertThat;
/** ITCase for presto connector. */
public class TestPrestoITCase {
+ private QueryRunner queryRunner;
+
private static final String CATALOG = "paimon";
private static final String DB = "default";
@@ -173,6 +176,11 @@ public class TestPrestoITCase {
return new SimpleTableTestHelper(tablePath, rowType);
}
+ @BeforeTest
+ public void init() throws Exception {
+ queryRunner = createQueryRunner();
+ }
+
@Test
public void testComplexTypes() throws Exception {
assertThat(sql("SELECT * FROM paimon.default.t4")).isEqualTo("[[1,
{1=2}]]");
@@ -187,7 +195,7 @@ public class TestPrestoITCase {
}
@Test
- public void testLimit() throws Exception {
+ public void testLimitCommon() throws Exception {
assertThat(sql("SELECT * FROM paimon.default.t1 LIMIT
1")).isEqualTo("[[1, 2, 1, 1]]");
assertThat(sql("SELECT * FROM paimon.default.t1 WHERE a = 5 LIMIT 1"))
.isEqualTo("[[5, 6, 3, 3]]");
@@ -216,7 +224,7 @@ public class TestPrestoITCase {
}
private String sql(String sql) throws Exception {
- MaterializedResult result = createQueryRunner().execute(sql);
+ MaterializedResult result = queryRunner.execute(sql);
return result.getMaterializedRows().toString();
}
}
diff --git
a/paimon-prestosql-332/src/test/java/org/apache/paimon/prestosql/TestPrestoSqlITCase.java
b/paimon-prestosql-332/src/test/java/org/apache/paimon/prestosql/TestPrestoSqlITCase.java
index 5a8d159..f841072 100644
---
a/paimon-prestosql-332/src/test/java/org/apache/paimon/prestosql/TestPrestoSqlITCase.java
+++
b/paimon-prestosql-332/src/test/java/org/apache/paimon/prestosql/TestPrestoSqlITCase.java
@@ -42,6 +42,7 @@ import io.prestosql.testing.AbstractTestQueryFramework;
import io.prestosql.testing.DistributedQueryRunner;
import io.prestosql.testing.MaterializedResult;
import io.prestosql.testing.QueryRunner;
+import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import java.nio.file.Files;
@@ -59,6 +60,8 @@ import static org.assertj.core.api.Assertions.assertThat;
/** ITCase for PrestoSql connector. */
public class TestPrestoSqlITCase extends AbstractTestQueryFramework {
+ private QueryRunner queryRunner;
+
private static final String CATALOG = "paimon";
private static final String DB = "default";
@@ -176,6 +179,11 @@ public class TestPrestoSqlITCase extends
AbstractTestQueryFramework {
return new SimpleTableTestHelper(tablePath, rowType);
}
+ @BeforeTest
+ public void init() throws Exception {
+ queryRunner = createQueryRunner();
+ }
+
@Test
public void testComplexTypes() {
assertThat(sql("SELECT * FROM paimon.default.t4")).isEqualTo("[[1,
{1=2}]]");
@@ -378,7 +386,7 @@ public class TestPrestoSqlITCase extends
AbstractTestQueryFramework {
}
private String sql(String sql) {
- MaterializedResult result = getQueryRunner().execute(sql);
+ MaterializedResult result = queryRunner.execute(sql);
return result.getMaterializedRows().toString();
}
}
diff --git
a/paimon-prestosql-common/src/test/java/org/apache/paimon/prestosql/TestPrestoSqlTCase.java
b/paimon-prestosql-common/src/test/java/org/apache/paimon/prestosql/TestPrestoSqlTCase.java
index 7bd4b16..16be38f 100644
---
a/paimon-prestosql-common/src/test/java/org/apache/paimon/prestosql/TestPrestoSqlTCase.java
+++
b/paimon-prestosql-common/src/test/java/org/apache/paimon/prestosql/TestPrestoSqlTCase.java
@@ -43,6 +43,7 @@ import io.prestosql.testing.AbstractTestQueryFramework;
import io.prestosql.testing.DistributedQueryRunner;
import io.prestosql.testing.MaterializedResult;
import io.prestosql.testing.QueryRunner;
+import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import java.nio.file.Files;
@@ -60,6 +61,8 @@ import static org.assertj.core.api.Assertions.assertThat;
/** ITCase for prestosql connector. */
public class TestPrestoSqlTCase extends AbstractTestQueryFramework {
+ private QueryRunner queryRunner;
+
private static final String CATALOG = "paimon";
private static final String DB = "default";
@@ -177,6 +180,11 @@ public class TestPrestoSqlTCase extends
AbstractTestQueryFramework {
return new SimpleTableTestHelper(tablePath, rowType);
}
+ @BeforeTest
+ public void init() throws Exception {
+ queryRunner = createQueryRunner();
+ }
+
@Test
public void testComplexTypes() {
assertThat(sql("SELECT * FROM paimon.default.t4")).isEqualTo("[[1,
{1=2}]]");
@@ -379,7 +387,7 @@ public class TestPrestoSqlTCase extends
AbstractTestQueryFramework {
}
private String sql(String sql) {
- MaterializedResult result = getQueryRunner().execute(sql);
+ MaterializedResult result = queryRunner.execute(sql);
return result.getMaterializedRows().toString();
}
}