Skip to content

Commit

Permalink
[Migrate-Test](multi-catalog) Migrate p2 tests from p2 to p0.
Browse files Browse the repository at this point in the history
  • Loading branch information
kaka11chen committed Jun 28, 2024
1 parent aeb89db commit 2936d25
Show file tree
Hide file tree
Showing 47 changed files with 690 additions and 197 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -353,18 +353,6 @@ LOCATION

msck repair table orc_all_types;

CREATE TABLE `student` (
id varchar(50),
name varchar(50),
age int,
gender varchar(50),
addr varchar(50),
phone varchar(50)
)
ROW FORMAT DELIMITED FIELDS TERMINATED by ','
LOCATION '/user/doris/preinstalled_data/data_case/student'
TBLPROPERTIES ('transient_lastDdlTime'='1658816839');

CREATE TABLE `lineorder` (
`lo_orderkey` int,
`lo_linenumber` int,
Expand All @@ -388,70 +376,6 @@ ROW FORMAT DELIMITED FIELDS TERMINATED by ','
LOCATION '/user/doris/preinstalled_data/data_case/lineorder'
TBLPROPERTIES ('transient_lastDdlTime'='1658816839');

CREATE TABLE `test1` (
col_1 int,
col_2 varchar(20),
col_3 int,
col_4 int,
col_5 varchar(20)
)
ROW FORMAT DELIMITED FIELDS TERMINATED by ','
LOCATION '/user/doris/preinstalled_data/data_case/test1'
TBLPROPERTIES ('transient_lastDdlTime'='1658816839');

CREATE TABLE `string_table` (
p_partkey string,
p_name string,
p_mfgr string,
p_brand string,
p_type string,
p_size string,
p_con string,
p_r_price string,
p_comment string
)
ROW FORMAT DELIMITED FIELDS TERMINATED by ','
LOCATION '/user/doris/preinstalled_data/data_case/string_table'
TBLPROPERTIES ('transient_lastDdlTime'='1658816839');

CREATE TABLE `account_fund` (
`batchno` string,
`appsheet_no` string,
`filedate` string,
`t_no` string,
`tano` string,
`t_name` string,
`chged_no` string,
`mob_no2` string,
`home_no` string,
`off_no` string
)
ROW FORMAT DELIMITED FIELDS TERMINATED by ','
STORED AS INPUTFORMAT
'org.apache.hadoop.mapred.TextInputFormat'
OUTPUTFORMAT
'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat'
LOCATION
'/user/doris/preinstalled_data/data_case/account_fund'
TBLPROPERTIES ('transient_lastDdlTime'='1658816839');

create table sale_table (
`bill_code` varchar(500),
`dates` varchar(500),
`ord_year` varchar(500),
`ord_month` varchar(500),
`ord_quarter` varchar(500),
`on_time` varchar(500)
)
ROW FORMAT DELIMITED FIELDS TERMINATED by ','
STORED AS INPUTFORMAT
'org.apache.hadoop.mapred.TextInputFormat'
OUTPUTFORMAT
'org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat'
LOCATION
'/user/doris/preinstalled_data/data_case/sale_table'
TBLPROPERTIES ('transient_lastDdlTime'='1658816839');

create table t_hive (
`k1` int,
`k2` char(10),
Expand All @@ -468,38 +392,6 @@ LOCATION
'/user/doris/preinstalled_data/data_case/t_hive'
TBLPROPERTIES ('transient_lastDdlTime'='1658816839');

create table hive01 (
first_year int,
d_disease varchar(200),
i_day int,
card_cnt bigint
)
ROW FORMAT DELIMITED FIELDS TERMINATED by ','
LOCATION
'/user/doris/preinstalled_data/data_case/hive01'
TBLPROPERTIES ('transient_lastDdlTime'='1658816839');

CREATE TABLE test2 (
id int,
name string ,
age string ,
avg_patient_time double,
dt date
)
row format delimited fields terminated by ','
stored as textfile
LOCATION '/user/doris/preinstalled_data/data_case/test2'
TBLPROPERTIES ('transient_lastDdlTime'='1658816839');

create table test_hive_doris(
id varchar(100),
age varchar(100)
)
row format delimited fields terminated by ','
stored as textfile
LOCATION '/user/doris/preinstalled_data/data_case/test_hive_doris'
TBLPROPERTIES ('transient_lastDdlTime'='1658816839');

CREATE external TABLE `table_with_vertical_line`(
`k1` string COMMENT 'k1',
`k2` string COMMENT 'k2',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
CREATE DATABASE IF NOT EXISTS default;
USE default;

CREATE TABLE `default.account_fund`(
`batchno` string,
`appsheet_no` string,
`filedate` string,
`t_no` string,
`tano` string,
`t_name` string,
`chged_no` string,
`mob_no2` string,
`home_no` string,
`off_no` string)
ROW FORMAT SERDE
'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
WITH SERDEPROPERTIES (
'field.delim'=',',
'serialization.format'=',')
STORED AS INPUTFORMAT
'org.apache.hadoop.mapred.TextInputFormat'
OUTPUTFORMAT
'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat'
LOCATION '/user/doris/suites/default/account_fund'
TBLPROPERTIES (
'transient_lastDdlTime'='1669712244');

msck repair table account_fund;
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
set -x

CUR_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"

## mkdir and put data to hdfs
cd "${CUR_DIR}" && rm -rf data/ && tar xzf data.tar.gz
hadoop fs -mkdir -p /user/doris/suites/default/
hadoop fs -put "${CUR_DIR}"/data/* /user/doris/suites/default/

# create table
hive -f "${CUR_DIR}/create_table.hql"
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
CREATE DATABASE IF NOT EXISTS default;
USE default;

CREATE TABLE `default.hive01`(
`first_year` int,
`d_disease` varchar(200),
`i_day` int,
`card_cnt` bigint)
ROW FORMAT SERDE
'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
WITH SERDEPROPERTIES (
'field.delim'=',',
'serialization.format'=',')
STORED AS INPUTFORMAT
'org.apache.hadoop.mapred.TextInputFormat'
OUTPUTFORMAT
'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
LOCATION '/user/doris/suites/default/hive01'
TBLPROPERTIES (
'transient_lastDdlTime'='1669712244');

msck repair table hive01;
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
set -x

CUR_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"

## mkdir and put data to hdfs
cd "${CUR_DIR}" && rm -rf data/ && tar xzf data.tar.gz
hadoop fs -mkdir -p /user/doris/suites/default/
hadoop fs -put "${CUR_DIR}"/data/* /user/doris/suites/default/

# create table
hive -f "${CUR_DIR}/create_table.hql"
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
CREATE DATABASE IF NOT EXISTS default;
USE default;

CREATE TABLE `default.sale_table`(
`bill_code` varchar(500),
`dates` varchar(500),
`ord_year` varchar(500),
`ord_month` varchar(500),
`ord_quarter` varchar(500),
`on_time` varchar(500))
ROW FORMAT SERDE
'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
WITH SERDEPROPERTIES (
'field.delim'=',',
'serialization.format'=',')
STORED AS INPUTFORMAT
'org.apache.hadoop.mapred.TextInputFormat'
OUTPUTFORMAT
'org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat'
LOCATION '/user/doris/suites/default/sale_table'
TBLPROPERTIES (
'transient_lastDdlTime'='1669712244');

msck repair table sale_table;
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
set -x

CUR_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"

## mkdir and put data to hdfs
cd "${CUR_DIR}" && rm -rf data/ && tar xzf data.tar.gz
hadoop fs -mkdir -p /user/doris/suites/default/
hadoop fs -put "${CUR_DIR}"/data/* /user/doris/suites/default/

# create table
hive -f "${CUR_DIR}/create_table.hql"
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
CREATE DATABASE IF NOT EXISTS default;
USE default;

CREATE TABLE `default.string_table`(
`p_partkey` string,
`p_name` string,
`p_mfgr` string,
`p_brand` string,
`p_type` string,
`p_size` string,
`p_con` string,
`p_r_price` string,
`p_comment` string)
ROW FORMAT SERDE
'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
WITH SERDEPROPERTIES (
'field.delim'=',',
'serialization.format'=',')
STORED AS INPUTFORMAT
'org.apache.hadoop.mapred.TextInputFormat'
OUTPUTFORMAT
'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
LOCATION '/user/doris/suites/default/string_table'
TBLPROPERTIES (
'transient_lastDdlTime'='1669712243');

msck repair table string_table;
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
set -x

CUR_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"

## mkdir and put data to hdfs
cd "${CUR_DIR}" && rm -rf data/ && tar xzf data.tar.gz
hadoop fs -mkdir -p /user/doris/suites/default/
hadoop fs -put "${CUR_DIR}"/data/* /user/doris/suites/default/

# create table
hive -f "${CUR_DIR}/create_table.hql"
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
CREATE DATABASE IF NOT EXISTS default;
USE default;

CREATE TABLE `default.student`(
`id` varchar(50),
`name` varchar(50),
`age` int,
`gender` varchar(50),
`addr` varchar(50),
`phone` varchar(50))
ROW FORMAT SERDE
'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
WITH SERDEPROPERTIES (
'field.delim'=',',
'serialization.format'=',')
STORED AS INPUTFORMAT
'org.apache.hadoop.mapred.TextInputFormat'
OUTPUTFORMAT
'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
LOCATION '/user/doris/suites/default/student'
TBLPROPERTIES (
'transient_lastDdlTime'='1669364024');

msck repair table student;
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
set -x

CUR_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"

## mkdir and put data to hdfs
cd "${CUR_DIR}" && rm -rf data/ && tar xzf data.tar.gz
hadoop fs -mkdir -p /user/doris/suites/default/
hadoop fs -put "${CUR_DIR}"/data/* /user/doris/suites/default/

# create table
hive -f "${CUR_DIR}/create_table.hql"
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
CREATE DATABASE IF NOT EXISTS default;
USE default;

CREATE TABLE `default.test1`(
`col_1` int,
`col_2` varchar(20),
`col_3` int,
`col_4` int,
`col_5` varchar(20))
ROW FORMAT SERDE
'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
WITH SERDEPROPERTIES (
'field.delim'=',',
'serialization.format'=',')
STORED AS INPUTFORMAT
'org.apache.hadoop.mapred.TextInputFormat'
OUTPUTFORMAT
'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
LOCATION '/user/doris/suites/default/test1'
TBLPROPERTIES (
'transient_lastDdlTime'='1669712243');

msck repair table test1;
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
set -x

CUR_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"

## mkdir and put data to hdfs
cd "${CUR_DIR}" && rm -rf data/ && tar xzf data.tar.gz
hadoop fs -mkdir -p /user/doris/suites/default/
hadoop fs -put "${CUR_DIR}"/data/* /user/doris/suites/default/

# create table
hive -f "${CUR_DIR}/create_table.hql"
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
CREATE DATABASE IF NOT EXISTS default;
USE default;

CREATE TABLE `default.test2`(
`id` int,
`name` string,
`age` string,
`avg_patient_time` double,
`dt` date)
ROW FORMAT SERDE
'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
WITH SERDEPROPERTIES (
'field.delim'=',',
'serialization.format'=',')
STORED AS INPUTFORMAT
'org.apache.hadoop.mapred.TextInputFormat'
OUTPUTFORMAT
'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
LOCATION '/user/doris/suites/default/test2'
TBLPROPERTIES (
'transient_lastDdlTime'='1669712244');

msck repair table test2;
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
set -x

CUR_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"

## mkdir and put data to hdfs
cd "${CUR_DIR}" && rm -rf data/ && tar xzf data.tar.gz
hadoop fs -mkdir -p /user/doris/suites/default/
hadoop fs -put "${CUR_DIR}"/data/* /user/doris/suites/default/

# create table
hive -f "${CUR_DIR}/create_table.hql"
Loading

0 comments on commit 2936d25

Please sign in to comment.