### _Why are the changes needed?_ This PR upgrades Kyuubi playground components to latest versions, including Spark 3.3.1, Kyuubi 1.6.1-incubating, Iceberg 1.1.0, and reorganizes the files in catalog folders. The images has been uploaded to Docker Hub. ### _How was this patch tested?_ - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [x] Add screenshots for manual tests if appropriate ``` cd docker/playground docker compose up -d ``` ``` docker exec -it kyuubi /opt/kyuubi/bin/beeline -u 'jdbc:hive2://0.0.0.0:10009/tpcds/tiny' ``` <img width="1416" alt="image" src="https://user-images.githubusercontent.com/26535726/204845474-b0dff173-d335-43bf-b61f-d8c34ee26ff8.png"> - [ ] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request Closes #3881 from pan3793/playground. Closes #3881 a3d42377 [Cheng Pan] Upgrade playground components to latest versions Authored-by: Cheng Pan <chengpan@apache.org> Signed-off-by: Cheng Pan <chengpan@apache.org>
149 lines
4.7 KiB
SQL
149 lines
4.7 KiB
SQL
-- 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.
|
|
--
|
|
|
|
SET tiny_schema=tpcds.tiny;
|
|
|
|
CREATE DATABASE IF NOT EXISTS spark_catalog.tpcds_tiny;
|
|
|
|
USE spark_catalog.tpcds_tiny;
|
|
|
|
--
|
|
-- Name: catalog_sales; Type: TABLE; Tablespace:
|
|
--
|
|
CREATE TABLE IF NOT EXISTS catalog_sales USING parquet PARTITIONED BY (cs_sold_date_sk)
|
|
AS SELECT * FROM ${tiny_schema}.catalog_sales;
|
|
|
|
--
|
|
-- Name: catalog_returns; Type: TABLE; Tablespace:
|
|
--
|
|
CREATE TABLE IF NOT EXISTS catalog_returns USING parquet PARTITIONED BY (cr_returned_date_sk)
|
|
AS SELECT * FROM ${tiny_schema}.catalog_returns;
|
|
|
|
--
|
|
-- Name: inventory; Type: TABLE; Tablespace:
|
|
--
|
|
CREATE TABLE IF NOT EXISTS inventory USING parquet PARTITIONED BY (inv_date_sk)
|
|
AS SELECT * FROM ${tiny_schema}.inventory;
|
|
|
|
--
|
|
-- Name: store_sales; Type: TABLE; Tablespace:
|
|
--
|
|
CREATE TABLE IF NOT EXISTS store_sales USING parquet PARTITIONED BY (ss_sold_date_sk)
|
|
AS SELECT * FROM ${tiny_schema}.store_sales;
|
|
|
|
--
|
|
-- Name: store_returns; Type: TABLE; Tablespace:
|
|
--
|
|
CREATE TABLE IF NOT EXISTS store_returns USING parquet PARTITIONED BY (sr_returned_date_sk)
|
|
AS SELECT * FROM ${tiny_schema}.store_returns;
|
|
|
|
--
|
|
-- Name: web_sales; Type: TABLE; Tablespace:
|
|
--
|
|
CREATE TABLE IF NOT EXISTS web_sales USING parquet PARTITIONED BY (ws_sold_date_sk)
|
|
AS SELECT * FROM ${tiny_schema}.web_sales;
|
|
|
|
--
|
|
-- Name: web_returns; Type: TABLE; Tablespace:
|
|
--
|
|
CREATE TABLE IF NOT EXISTS web_returns USING parquet PARTITIONED BY (wr_returned_date_sk)
|
|
AS SELECT * FROM ${tiny_schema}.web_returns;
|
|
|
|
--
|
|
-- Name: call_center; Type: TABLE; Tablespace:
|
|
--
|
|
CREATE TABLE IF NOT EXISTS call_center USING parquet AS SELECT * FROM ${tiny_schema}.call_center;
|
|
|
|
--
|
|
-- Name: catalog_page; Type: TABLE; Tablespace:
|
|
--
|
|
CREATE TABLE IF NOT EXISTS catalog_page USING parquet AS SELECT * FROM ${tiny_schema}.catalog_page;
|
|
|
|
--
|
|
-- Name: customer; Type: TABLE; Tablespace:
|
|
--
|
|
CREATE TABLE IF NOT EXISTS customer USING parquet AS SELECT * FROM ${tiny_schema}.customer;
|
|
|
|
--
|
|
-- Name: customer_address; Type: TABLE; Tablespace:
|
|
--
|
|
CREATE TABLE IF NOT EXISTS customer_address USING parquet AS SELECT * FROM ${tiny_schema}.customer_address;
|
|
|
|
--
|
|
-- Name: customer_demographics; Type: TABLE; Tablespace:
|
|
--
|
|
CREATE TABLE IF NOT EXISTS customer_demographics USING parquet AS SELECT * FROM ${tiny_schema}.customer_demographics;
|
|
|
|
--
|
|
-- Name: date_dim; Type: TABLE; Tablespace:
|
|
--
|
|
CREATE TABLE IF NOT EXISTS date_dim USING parquet AS SELECT * FROM ${tiny_schema}.date_dim;
|
|
|
|
--
|
|
-- Name: household_demographics; Type: TABLE; Tablespace:
|
|
--
|
|
CREATE TABLE IF NOT EXISTS household_demographics USING parquet AS SELECT * FROM ${tiny_schema}.household_demographics;
|
|
|
|
--
|
|
-- Name: income_band; Type: TABLE; Tablespace:
|
|
--
|
|
CREATE TABLE IF NOT EXISTS income_band USING parquet AS SELECT * FROM ${tiny_schema}.income_band;
|
|
|
|
--
|
|
-- Name: item; Type: TABLE; Tablespace:
|
|
--
|
|
CREATE TABLE IF NOT EXISTS item USING parquet AS SELECT * FROM ${tiny_schema}.item;
|
|
|
|
--
|
|
-- Name: promotion; Type: TABLE; Tablespace:
|
|
--
|
|
CREATE TABLE IF NOT EXISTS promotion USING parquet AS SELECT * FROM ${tiny_schema}.promotion;
|
|
|
|
--
|
|
-- Name: reason; Type: TABLE; Tablespace:
|
|
--
|
|
CREATE TABLE IF NOT EXISTS reason USING parquet AS SELECT * FROM ${tiny_schema}.reason;
|
|
|
|
--
|
|
-- Name: ship_mode; Type: TABLE; Tablespace:
|
|
--
|
|
CREATE TABLE IF NOT EXISTS ship_mode USING parquet AS SELECT * FROM ${tiny_schema}.ship_mode;
|
|
|
|
--
|
|
-- Name: store; Type: TABLE; Tablespace:
|
|
--
|
|
CREATE TABLE IF NOT EXISTS store USING parquet AS SELECT * FROM ${tiny_schema}.store;
|
|
|
|
--
|
|
-- Name: time_dim; Type: TABLE; Tablespace:
|
|
--
|
|
CREATE TABLE IF NOT EXISTS time_dim USING parquet AS SELECT * FROM ${tiny_schema}.time_dim;
|
|
|
|
--
|
|
-- Name: warehouse; Type: TABLE; Tablespace:
|
|
--
|
|
CREATE TABLE IF NOT EXISTS warehouse USING parquet AS SELECT * FROM ${tiny_schema}.warehouse;
|
|
|
|
--
|
|
-- Name: web_page; Type: TABLE; Tablespace:
|
|
--
|
|
CREATE TABLE IF NOT EXISTS web_page USING parquet AS SELECT * FROM ${tiny_schema}.web_page;
|
|
|
|
--
|
|
-- Name: web_site; Type: TABLE; Tablespace:
|
|
--
|
|
CREATE TABLE IF NOT EXISTS web_site USING parquet AS SELECT * FROM ${tiny_schema}.web_site;
|