Skip to content

Commit

Permalink
4
Browse files Browse the repository at this point in the history
  • Loading branch information
stephen committed Jul 27, 2024
1 parent 5bbfc13 commit ddc9ba8
Show file tree
Hide file tree
Showing 13 changed files with 130 additions and 125 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,7 @@ class Suite implements GroovyInterceptable {
if (exitcode != 0) {
staticLogger.info("exit code: ${exitcode}, output\n: ${proc.text}")
if (mustSuc == true) {
Assert.assertEquals(0, exitCode)
Assert.assertEquals(0, exitcode)
}
}
} catch (IOException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,6 @@
// under the License.

suite("test_trino_different_parquet_types", "p0,external,hive,external_docker,external_docker_hive") {
def host_ips = new ArrayList()
String[][] backends = sql """ show backends """
for (def b in backends) {
host_ips.add(b[1])
}
String [][] frontends = sql """ show frontends """
for (def f in frontends) {
host_ips.add(f[1])
}
dispatchTrinoConnectors(host_ips.unique())

String hms_port = context.config.otherConfigs.get("hive2HmsPort")
String hdfs_port = context.config.otherConfigs.get("hive2HdfsPort")
Expand Down Expand Up @@ -185,6 +175,16 @@ suite("test_trino_different_parquet_types", "p0,external,hive,external_docker,ex

String enabled = context.config.otherConfigs.get("enableHiveTest")
if (enabled != null && enabled.equalsIgnoreCase("true")) {
def host_ips = new ArrayList()
String[][] backends = sql """ show backends """
for (def b in backends) {
host_ips.add(b[1])
}
String [][] frontends = sql """ show frontends """
for (def f in frontends) {
host_ips.add(f[1])
}
dispatchTrinoConnectors(host_ips.unique())
try {
String catalog_name = "test_trino_different_parquet_types"
sql """drop catalog if exists ${catalog_name}"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,6 @@
// under the License.

suite("test_trino_hive_orc", "all_types,external,hive,external_docker,external_docker_hive") {
def host_ips = new ArrayList()
String[][] backends = sql """ show backends """
for (def b in backends) {
host_ips.add(b[1])
}
String [][] frontends = sql """ show frontends """
for (def f in frontends) {
host_ips.add(f[1])
}
dispatchTrinoConnectors(host_ips.unique())

// Ensure that all types are parsed correctly
def select_top50 = {
Expand Down Expand Up @@ -88,6 +78,16 @@ suite("test_trino_hive_orc", "all_types,external,hive,external_docker,external_d

String enabled = context.config.otherConfigs.get("enableHiveTest")
if (enabled != null && enabled.equalsIgnoreCase("true")) {
def host_ips = new ArrayList()
String[][] backends = sql """ show backends """
for (def b in backends) {
host_ips.add(b[1])
}
String [][] frontends = sql """ show frontends """
for (def f in frontends) {
host_ips.add(f[1])
}
dispatchTrinoConnectors(host_ips.unique())
try {
String hms_port = context.config.otherConfigs.get("hive2HmsPort")
String catalog_name = "test_trino_hive_orc"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,6 @@
// under the License.

suite("test_trino_hive_other", "external,hive,external_docker,external_docker_hive") {
def host_ips = new ArrayList()
String[][] backends = sql """ show backends """
for (def b in backends) {
host_ips.add(b[1])
}
String [][] frontends = sql """ show frontends """
for (def f in frontends) {
host_ips.add(f[1])
}
dispatchTrinoConnectors(host_ips.unique())

def q01 = {
qt_q24 """ select name, count(1) as c from student group by name order by name desc;"""
Expand Down Expand Up @@ -62,6 +52,16 @@ suite("test_trino_hive_other", "external,hive,external_docker,external_docker_hi

String enabled = context.config.otherConfigs.get("enableHiveTest")
if (enabled != null && enabled.equalsIgnoreCase("true")) {
def host_ips = new ArrayList()
String[][] backends = sql """ show backends """
for (def b in backends) {
host_ips.add(b[1])
}
String [][] frontends = sql """ show frontends """
for (def f in frontends) {
host_ips.add(f[1])
}
dispatchTrinoConnectors(host_ips.unique())
String hms_port = context.config.otherConfigs.get("hive2HmsPort")
String hdfs_port = context.config.otherConfigs.get("hive2HdfsPort")
String externalEnvIp = context.config.otherConfigs.get("externalEnvIp")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,7 @@
// under the License.

suite("test_trino_hive_parquet", "p0,external,hive,external_docker,external_docker_hive") {
def host_ips = new ArrayList()
String[][] backends = sql """ show backends """
for (def b in backends) {
host_ips.add(b[1])
}
String [][] frontends = sql """ show frontends """
for (def f in frontends) {
host_ips.add(f[1])
}
dispatchTrinoConnectors(host_ips.unique())


def q01 = {
qt_q01 """
select * from partition_table order by l_orderkey, l_partkey, l_suppkey;
Expand Down Expand Up @@ -182,6 +172,16 @@ suite("test_trino_hive_parquet", "p0,external,hive,external_docker,external_dock

String enabled = context.config.otherConfigs.get("enableHiveTest")
if (enabled != null && enabled.equalsIgnoreCase("true")) {
def host_ips = new ArrayList()
String[][] backends = sql """ show backends """
for (def b in backends) {
host_ips.add(b[1])
}
String [][] frontends = sql """ show frontends """
for (def f in frontends) {
host_ips.add(f[1])
}
dispatchTrinoConnectors(host_ips.unique())
try {
String hms_port = context.config.otherConfigs.get("hive2HmsPort")
String catalog_name = "test_trino_hive_parquet"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,7 @@
// under the License.

suite("test_trino_hive_schema_evolution", "p0,external,hive,external_docker,external_docker_hive") {
def host_ips = new ArrayList()
String[][] backends = sql """ show backends """
for (def b in backends) {
host_ips.add(b[1])
}
String [][] frontends = sql """ show frontends """
for (def f in frontends) {
host_ips.add(f[1])
}
dispatchTrinoConnectors(host_ips.unique())


def q_text = {
qt_q01 """
select * from schema_evo_test_text order by id;
Expand Down Expand Up @@ -67,6 +57,17 @@ suite("test_trino_hive_schema_evolution", "p0,external,hive,external_docker,exte
String externalEnvIp = context.config.otherConfigs.get("externalEnvIp")

if (enabled != null && enabled.equalsIgnoreCase("true")) {
def host_ips = new ArrayList()
String[][] backends = sql """ show backends """
for (def b in backends) {
host_ips.add(b[1])
}
String [][] frontends = sql """ show frontends """
for (def f in frontends) {
host_ips.add(f[1])
}
dispatchTrinoConnectors(host_ips.unique())

try {
String hms_port = context.config.otherConfigs.get("hive2HmsPort")
String catalog_name = "test_trino_hive_schema_evolution"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@
// under the License.

suite("test_trino_hive_serde_prop", "external_docker,hive,external_docker_hive,p0,external") {
def host_ips = new ArrayList()
String[][] backends = sql """ show backends """
for (def b in backends) {
host_ips.add(b[1])
}
String [][] frontends = sql """ show frontends """
for (def f in frontends) {
host_ips.add(f[1])
}
dispatchTrinoConnectors(host_ips.unique())


String enabled = context.config.otherConfigs.get("enableHiveTest")
if (enabled != null && enabled.equalsIgnoreCase("true")) {
def host_ips = new ArrayList()
String[][] backends = sql """ show backends """
for (def b in backends) {
host_ips.add(b[1])
}
String [][] frontends = sql """ show frontends """
for (def f in frontends) {
host_ips.add(f[1])
}
dispatchTrinoConnectors(host_ips.unique())
String catalog_name = "test_trino_hive_serde_prop"
String ex_db_name = "`stats_test`"
String externalEnvIp = context.config.otherConfigs.get("externalEnvIp")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@
// under the License.

suite("test_trino_hive_tablesample_p0", "all_types,p0,external,hive,external_docker,external_docker_hive") {
def host_ips = new ArrayList()
String[][] backends = sql """ show backends """
for (def b in backends) {
host_ips.add(b[1])
}
String [][] frontends = sql """ show frontends """
for (def f in frontends) {
host_ips.add(f[1])
}
dispatchTrinoConnectors(host_ips.unique())

String enabled = context.config.otherConfigs.get("enableHiveTest")
if (enabled != null && enabled.equalsIgnoreCase("true")) {
def host_ips = new ArrayList()
String[][] backends = sql """ show backends """
for (def b in backends) {
host_ips.add(b[1])
}
String [][] frontends = sql """ show frontends """
for (def f in frontends) {
host_ips.add(f[1])
}
dispatchTrinoConnectors(host_ips.unique())
try {
String hms_port = context.config.otherConfigs.get("hive2HmsPort")
String catalog_name = "test_trino_hive_tablesample_p0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,6 @@
// under the License.

suite("test_trino_hive_tpch_sf1_orc", "p0,external,hive,external_docker,external_docker_hive") {
def host_ips = new ArrayList()
String[][] backends = sql """ show backends """
for (def b in backends) {
host_ips.add(b[1])
}
String [][] frontends = sql """ show frontends """
for (def f in frontends) {
host_ips.add(f[1])
}
dispatchTrinoConnectors(host_ips.unique())

String enable_file_cache = "false"
def q01 = {
Expand Down Expand Up @@ -857,6 +847,16 @@ order by

String enabled = context.config.otherConfigs.get("enableHiveTest")
if (enabled != null && enabled.equalsIgnoreCase("true")) {
def host_ips = new ArrayList()
String[][] backends = sql """ show backends """
for (def b in backends) {
host_ips.add(b[1])
}
String [][] frontends = sql """ show frontends """
for (def f in frontends) {
host_ips.add(f[1])
}
dispatchTrinoConnectors(host_ips.unique())
String hms_port = context.config.otherConfigs.get("hive2HmsPort")
String catalog_name = "test_trino_hive_tpch_sf1_orc"
String externalEnvIp = context.config.otherConfigs.get("externalEnvIp")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,6 @@
// under the License.

suite("test_trino_hive_tpch_sf1_parquet", "p0,external,hive,external_docker,external_docker_hive") {
def host_ips = new ArrayList()
String[][] backends = sql """ show backends """
for (def b in backends) {
host_ips.add(b[1])
}
String [][] frontends = sql """ show frontends """
for (def f in frontends) {
host_ips.add(f[1])
}
dispatchTrinoConnectors(host_ips.unique())

String enable_file_cache = "false"
def q01 = {
Expand Down Expand Up @@ -857,6 +847,16 @@ order by

String enabled = context.config.otherConfigs.get("enableHiveTest")
if (enabled != null && enabled.equalsIgnoreCase("true")) {
def host_ips = new ArrayList()
String[][] backends = sql """ show backends """
for (def b in backends) {
host_ips.add(b[1])
}
String [][] frontends = sql """ show frontends """
for (def f in frontends) {
host_ips.add(f[1])
}
dispatchTrinoConnectors(host_ips.unique())
String hms_port = context.config.otherConfigs.get("hive2HmsPort")
String catalog_name = "test_trino_hive_tpch_sf1_parquet"
String externalEnvIp = context.config.otherConfigs.get("externalEnvIp")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@
// under the License.

suite("test_trino_prepare_hive_data_in_case", "p0,external,hive,external_docker,external_docker_hive") {
def host_ips = new ArrayList()
String[][] backends = sql """ show backends """
for (def b in backends) {
host_ips.add(b[1])
}
String [][] frontends = sql """ show frontends """
for (def f in frontends) {
host_ips.add(f[1])
}
dispatchTrinoConnectors(host_ips.unique())


String enabled = context.config.otherConfigs.get("enableHiveTest")
def catalog_name = "test_trino_prepare_hive_data_in_case"
if (enabled != null && enabled.equalsIgnoreCase("true")) {
def host_ips = new ArrayList()
String[][] backends = sql """ show backends """
for (def b in backends) {
host_ips.add(b[1])
}
String [][] frontends = sql """ show frontends """
for (def f in frontends) {
host_ips.add(f[1])
}
dispatchTrinoConnectors(host_ips.unique())
try {
String externalEnvIp = context.config.otherConfigs.get("externalEnvIp")
String hms_port = context.config.otherConfigs.get("hive2HmsPort")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,6 @@ import org.apache.kafka.clients.producer.ProducerRecord
import org.apache.kafka.clients.producer.ProducerConfig

suite("test_trino_kafka_base", "external,kafka,external_docker,external_docker_kafka") {
// set up trino-connector plugins
def host_ips = new ArrayList()
String[][] backends = sql """ show backends """
for (def b in backends) {
host_ips.add(b[1])
}
String [][] frontends = sql """ show frontends """
for (def f in frontends) {
host_ips.add(f[1])
}
dispatchTrinoConnectors(host_ips.unique())

// Ensure that all types are parsed correctly
def select_top50 = {
Expand All @@ -43,6 +32,18 @@ suite("test_trino_kafka_base", "external,kafka,external_docker,external_docker_k
String enabled_trino_connector = context.config.otherConfigs.get("enableTrinoConnectorTest")
if (enabled != null && enabled.equalsIgnoreCase("true")
&& enabled_trino_connector!= null && enabled_trino_connector.equalsIgnoreCase("true")) {
// set up trino-connector plugins
def host_ips = new ArrayList()
String[][] backends = sql """ show backends """
for (def b in backends) {
host_ips.add(b[1])
}
String [][] frontends = sql """ show frontends """
for (def f in frontends) {
host_ips.add(f[1])
}
dispatchTrinoConnectors(host_ips.unique())

def kafkaCsvTpoics = [
"trino_kafka_basic_data"
]
Expand Down
Loading

0 comments on commit ddc9ba8

Please sign in to comment.