Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MD-2882: Modified hive change metadata scripts #403

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 27 additions & 24 deletions framework/resources/Datasources/hive_storage/change_metadata2.ddl
Original file line number Diff line number Diff line change
Expand Up @@ -34,45 +34,45 @@ ALTER TABLE remove_columns2 REPLACE COLUMNS (
ALTER TABLE modify_columntypes1 REPLACE COLUMNS (
int_col string,
bigint_col varchar(50),
date_col int,
time_col bigint,
date_col date,
time_col string,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious - why "string"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change metadata

timestamp_col varchar(20),
interval_col date,
varchar_col int,
float_col int,
double_col float,
bool_col int
interval_col string,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change metadata

varchar_col string,
float_col float,
double_col double,
bool_col boolean
);

ALTER TABLE modify_columntypes2 REPLACE COLUMNS (
int_col float,
bigint_col int,
bigint_col bigint,
date_col varchar(15),
time_col timestamp,
timestamp_col date,
interval_col boolean,
time_col string,
timestamp_col timestamp,
interval_col string,
varchar_col varchar(5),
float_col string,
double_col bigint,
bool_col float
double_col double,
bool_col boolean
);

alter table seq_modify_columntypes1 replace columns (
l_orderkey float,
l_partkey double,
l_suppkey varchar(1),
l_linenumber string,
l_quantity bigint,
l_extendedprice int,
l_discount float,
l_quantity double,
l_extendedprice double,
l_discount double,
l_tax varchar(20),
l_returnflag boolean,
l_linestatus int,
l_shipdate timestamp,
l_returnflag string,
l_linestatus string,
l_shipdate date,
l_commitdate string,
l_receiptdate int,
l_receiptdate date,
l_shipinstruct varchar(2),
l_shipmode boolean,
l_shipmode string,
l_comment double
);
ALTER TABLE dpp_compressed_mktevents ADD COLUMNS (newcol STRING);
Expand All @@ -87,7 +87,10 @@ ALTER TABLE changemetadata_orders_partitioned ADD PARTITION (year=1997) location

ALTER TABLE changemetadata_orders_partitioned1 replace columns (
o_orderkey INT,
o_custkey INT,
o_custkey INT
);

ALTER TABLE changemetadata_orders_partitioned1 add columns (
o_orderdate STRING,
o_orderpriority STRING,
o_clerk STRING,
Expand All @@ -103,9 +106,9 @@ ALTER TABLE changemetadata_orders_partitioned2 replace columns (
o_custkey STRING,
o_orderstatus STRING,
o_totalprice DOUBLE,
o_orderdate BOOLEAN,
o_orderdate STRING,
o_orderpriority VARCHAR(1),
o_clerk DOUBLE,
o_shippriority INT
);
ALTER TABLE changemetadata_orders_partitioned2 DROP IF EXISTS PARTITION(year=1990)
ALTER TABLE changemetadata_orders_partitioned2 DROP IF EXISTS PARTITION(year=1990);
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
1 98723980547 null null null null null 2345 null null
null 24509823475 null null 1997-01-02 00:00:00. null null 3243 664522.3 null
3 3475789234 null null null null null 234533 234522.33 null
4 null null null null null null null 2.22223453E12 null
5 39575748 null null 1997-02-10 17:32:00. null null 23 654.4 null
6 47509823 null null 1997-02-11 17:32:01. null null null null null
7 7520398475 null null 1997-02-12 17:32:01. null null 211 7.9827635E8 null
8 null null null 1997-02-13 17:32:01. null null 9823 98723.88 null
9 509238475 null null null null null null 98273.45 null
10 4345234 null null 1997-02-15 17:32:01. null null 425 4756389.5 null
null 980347589 null null 1997-02-16 17:32:01. null null 3433 87364.5 null
12 859702345 null null 1897-02-18 17:32:01. null null 34980 78346.34 null
13 57784356923 null null 2002-02-14 17:32:01. null null 3425 765234.44 null
14 302 null null 1991-02-10 17:32:01. null null 3654 763478.56 null
15 2983475089 null null 1900-02-16 17:32:01. null null 5365 8767985.0 null
16 null null null null null null 4784 2037598.6 null
null 3750982435 null null 1897-02-16 17:32:01. null null 6459 6538.783 null
18 4582345 null null 1997-02-16 17:32:01. null null null 6.8791192E7 null
null 982 null null null null null 645 87623.34 null
20 7893759083 null null 1996-02-28 17:32:01. null null 345 8623.461 null
1 98723980547 null 00:00:00 null P18582D jllkjsdhfg 2345.33 null false
null 24509823475 null 01:00:00 1997-01-02 00:00:00. P1DT9045S jhgduitweriuoert 3243.32 664522.332 true
3 3475789234 null null null P1DT9000S gfdstweopiu 234533.2 234522.3221 true
4 null 1996-01-29 11:59:00 null P10DT9000S gjklhsdfgkjhkASDF null 2.22223454324544E12 false
5 39575748 1996-03-01 12:00:00 1997-02-10 17:32:00. P1DT9045.100S oieoiutriotureWERTgwgEWRg 23.5 654.4 false
6 47509823 1996-03-02 12:01:00 1997-02-11 17:32:01. P1Y2M gjkdfkjglfd 2.34555238E9 null false
7 7520398475 1997-02-28 23:59:00 1997-02-12 17:32:01. P2Y ioerutklsdfASDgerGWEr 211.2 7.982763409E8 true
8 null null 23:59:59.990 1997-02-13 17:32:01. null lkjgfiurtoUYFHfahui 9823.435 98723.879 false
9 509238475 1997-03-01 15:36:39 null P1DT9000S IOUfiuodsfIUfjkh null 98273.455 true
10 4345234 1997-03-02 15:36:39 1997-02-15 17:32:01. P10DT9000S iweuoHUIhUwer 425.43 4756389.345 false
null 980347589 2000-04-01 00:01:00 1997-02-16 17:32:01. P1DT9045.100S KfijUIwre 3433.3 87364.5 true
12 859702345 2000-04-03 null 1897-02-18 17:32:01. P1DT9045S dfgoiuert 34980.43 78346.3452 false
13 57784356923 2038-04-08 23:59:00 2002-02-14 17:32:01. P2Y uitreo 3425.543 765234.43 null
14 302 2039-04-09 12:03:00 1991-02-10 17:32:01. P1Y2M uigoMnvjjkdf 3654.43 763478.5623 false
15 2983475089 2040-04-10 null 1900-02-16 17:32:01. P10DT9000S NvvdfHVG 5365.643 8767985.43 true
16 null null 19:59:00 null P18582D null 4784.5737 2037598.58734 null
null 3750982435 1999-02-08 11:59:59.990 1897-02-16 17:32:01. P1DT9045S Nhkhuivb 6459.592 6538.7832 false
18 4582345 1999-03-08 null 1997-02-16 17:32:01. null uiuikjk null 6.879118943E7 null
null 982 1999-01-18 15:36:39 null P1DT9045.100S null 645.2321 87623.34 true
20 7893759083 2003-01-02 11:59:59.990 1996-02-28 17:32:01. P1DT9000S hjiwgh 345.543 8623.461 false
null null null null null null null null null null
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
1.0 null null null null null jllkj 2345.33 null null
null null null null null null jhgdu 3243.32 664522 null
3.0 null null null null null gfdst 234533.2 234522 null
4.0 null 1996-01-29 null null null gjklh null 2222234543245 null
5.0 39575748 1996-03-01 null null null oieoi 23.5 654 null
6.0 47509823 1996-03-02 null null null gjkdf 2345552345.5342 null null
7.0 null 1997-02-28 null null null ioeru 211.2 798276340 null
8.0 null null null null null lkjgf 9823.435 98723 null
9.0 509238475 1997-03-01 null null null IOUfi null 98273 null
10.0 4345234 1997-03-02 null null null iweuo 425.43 4756389 null
null 980347589 2000-04-01 null null null KfijU 3433.3 87364 null
12.0 859702345 2000-04-03 null null null dfgoi 34980.43 78346 null
13.0 null 2038-04-08 null null null uitre 3425.543 765234 null
14.0 302 2039-04-09 null null null uigoM 3654.43 763478 null
15.0 null 2040-04-10 null null null Nvvdf 5365.643 8767985 null
16.0 null null null null null null 4784.5735 2037598 null
null null 1999-02-08 null null null Nhkhu 6459.592 6538 null
18.0 4582345 1999-03-08 null null null uiuik null 68791189 null
null 982 1999-01-18 null null null null 645.2321 87623 null
20.0 null 2003-01-02 null null null hjiwg 345.543 8623 null
1.0 98723980547 null 00:00:00 null P18582D jllkj 2345.33 null false
null 24509823475 null 01:00:00 1997-01-02 00:00:00.0 P1DT9045S jhgdu 3243.32 664522.332 true
3.0 3475789234 null null null P1DT9000S gfdst 234533.2 234522.3221 true
4.0 null 1996-01-29 11:59:00 null P10DT9000S gjklh null 2.22223454324544E12 false
5.0 39575748 1996-03-01 12:00:00 1997-02-10 17:32:00.0 P1DT9045.100S oieoi 23.5 654.4 false
6.0 47509823 1996-03-02 12:01:00 1997-02-11 17:32:01.0 P1Y2M gjkdf 2345552345.5342 null false
7.0 7520398475 1997-02-28 23:59:00 1997-02-12 17:32:01.0 P2Y ioeru 211.2 7.982763409E8 true
8.0 null null 23:59:59.990 1997-02-13 17:32:01.0 null lkjgf 9823.435 98723.879 false
9.0 509238475 1997-03-01 15:36:39 null P1DT9000S IOUfi null 98273.455 true
10.0 4345234 1997-03-02 15:36:39 1997-02-15 17:32:01.0 P10DT9000S iweuo 425.43 4756389.345 false
null 980347589 2000-04-01 00:01:00 1997-02-16 17:32:01.0 P1DT9045.100S KfijU 3433.3 87364.5 true
12.0 859702345 2000-04-03 null 1897-02-18 17:32:01.0 P1DT9045S dfgoi 34980.43 78346.3452 false
13.0 57784356923 2038-04-08 23:59:00 2002-02-14 17:32:01.0 P2Y uitre 3425.543 765234.43 null
14.0 302 2039-04-09 12:03:00 1991-02-10 17:32:01.0 P1Y2M uigoM 3654.43 763478.5623 false
15.0 2983475089 2040-04-10 null 1900-02-16 17:32:01.0 P10DT9000S Nvvdf 5365.643 8767985.43 true
16.0 null null 19:59:00 null P18582D null 4784.5735 2037598.58734 null
null 3750982435 1999-02-08 11:59:59.990 1897-02-16 17:32:01.0 P1DT9045S Nhkhu 6459.592 6538.7832 false
18.0 4582345 1999-03-08 null 1997-02-16 17:32:01.0 null uiuik null 6.879118943E7 null
null 982 1999-01-18 15:36:39 null P1DT9045.100S null 645.2321 87623.34 true
20.0 7893759083 2003-01-02 11:59:59.990 1996-02-28 17:32:01.0 P1DT9000S hjiwg 345.543 8623.461 false
null null null null null null null null null null
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
8001.0 1261 F 247061.3 true 2 null 0 1991
8002.0 22 F 181048.04 true 4 null 0 1991
8001.0 1261 F 247061.3 1993-11-20 2 null 0 1991
8002.0 22 F 181048.04 1993-03-14 4 null 0 1991
Loading