[Enhance](regression) add hms catalog broker scan case (#25453)
This commit is contained in:
@ -0,0 +1,10 @@
|
||||
-- This file is automatically generated. You should know what you did if you want to edit this
|
||||
-- !q01 --
|
||||
Tom 1 shanghai 48 male
|
||||
Jerry 2 guangzhou 35 male
|
||||
Frank 3 hangzhou 25 male
|
||||
Ada 4 beijing 22 female
|
||||
|
||||
-- !q02 --
|
||||
2
|
||||
|
||||
@ -0,0 +1,56 @@
|
||||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
|
||||
suite("test_hive_broker_scan", "p0,external,hive,external_docker,external_docker_hive,external_docker_broker") {
|
||||
|
||||
def q01 = {
|
||||
qt_q01 """
|
||||
select * from test_different_column_orders_parquet
|
||||
"""
|
||||
}
|
||||
|
||||
def q02 = {
|
||||
qt_q02 """
|
||||
select count(*) from student;
|
||||
"""
|
||||
}
|
||||
|
||||
String enabled = context.config.otherConfigs.get("enableHiveTest")
|
||||
if (enabled != null && enabled.equalsIgnoreCase("true")) {
|
||||
try {
|
||||
String externalEnvIp = context.config.otherConfigs.get("externalEnvIp")
|
||||
String hms_port = context.config.otherConfigs.get("hms_port")
|
||||
String catalog_name = "hdfs_broker_catalog"
|
||||
String broker_name = "hdfs"
|
||||
|
||||
sql """drop catalog if exists ${catalog_name}"""
|
||||
// create HMS catalog with broker binding
|
||||
sql """create catalog if not exists ${catalog_name} properties (
|
||||
'type'='hms',
|
||||
'hive.metastore.uris'='thrift://${externalEnvIp}:${hms_port}',
|
||||
'broker.name'='${broker_name}'
|
||||
);"""
|
||||
sql """use `${catalog_name}`.`default`"""
|
||||
|
||||
q01()
|
||||
q02()
|
||||
|
||||
sql """drop catalog if exists ${catalog_name}"""
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user