[regresion-test](icebergv2) add icebergv2 test case (#15187)

This commit is contained in:
slothever
2022-12-22 13:45:07 +08:00
committed by GitHub
parent c9f26183b0
commit 2bb4ea5dea
2 changed files with 74 additions and 0 deletions

View File

@ -0,0 +1,27 @@
-- This file is automatically generated. You should know what you did if you want to edit this
-- !q01 --
149990
-- !q02 --
45132671
-- !q03 --
0
-- !q04 --
1 Customer#000000001 IVhzIApeRb ot,c,E 15 25-989-741-2988 711.56 BUILDING to the even, regular platelets. regular, ironic epitaphs nag e |
2 Customer#000000002 XSTf4,NCwDVaWNe6tEgvwfmRchLXak 13 23-768-687-3665 121.65 AUTOMOBILE l accounts. blithely ironic theodolites integrate boldly: caref |
3 Customer#000000003 MG9kdTD2WBHm 1 11-719-748-3364 7498.12 AUTOMOBILE deposits eat slyly ironic, even instructions. express foxes detect slyly. blithely even accounts abov |
-- !q05 -
366778465
366778561
366778657
-- !q06 --
10539361
130424833
2736865
-- !q07 --
1499999990

View File

@ -0,0 +1,47 @@
// 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_external_catalog_icebergv2", "p2") {
String enabled = context.config.otherConfigs.get("enableExternalHiveTest")
if (enabled != null && enabled.equalsIgnoreCase("true")) {
String extHiveHmsHost = context.config.otherConfigs.get("extHiveHmsHost")
String extHiveHmsPort = context.config.otherConfigs.get("extHiveHmsPort")
String catalog_name = "test_external_catalog_iceberg"
sql """drop catalog if exists ${catalog_name};"""
sql """
create catalog if not exists ${catalog_name} properties (
'type'='hms',
'hive.metastore.uris' = 'thrift://${extHiveHmsHost}:${extHiveHmsPort}'
);
"""
sql """switch ${catalog_name};"""
// test parquet format format
def q01 = {
qt_q01 """ select count(1) as c from customer_small;"""
qt_q02 """ select count(1) from orders """
qt_q03 """ select count(1) from customer_small where c_name = 'Customer#0063356' order by c_custkey limit 1; """
qt_q04 """ select * from customer_small order by c_custkey limit 3 """
qt_q05 """ select o_orderkey from orders where o_orderkey > 652566 limit 3"""
qt_q06 """ select o_orderkey from orders where o_custkey < 3357 limit 3"""
qt_q07 """ select count(1) as c from customer;"""
}
sql """ use `tpch_1000_icebergv2`; """
q01()
}
}