diff options
author | ivanmorozov333 <111685085+ivanmorozov333@users.noreply.github.com> | 2024-04-10 10:10:01 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-10 10:10:01 +0300 |
commit | 09e28e77e0f9a54ec68a8fc8b71a9f910abe50ab (patch) | |
tree | 1dc31fd2ea5bb16f6393c34b82b2387c4de3beae | |
parent | 0cfb65ba65af9abfef9de71c499e76d3ef58a644 (diff) | |
download | ydb-09e28e77e0f9a54ec68a8fc8b71a9f910abe50ab.tar.gz |
fix tpch column types (#3562)
-rw-r--r-- | ydb/public/lib/ydb_cli/commands/tpch_schema.sql | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/ydb/public/lib/ydb_cli/commands/tpch_schema.sql b/ydb/public/lib/ydb_cli/commands/tpch_schema.sql index f3f499dca54..92a7590fd6a 100644 --- a/ydb/public/lib/ydb_cli/commands/tpch_schema.sql +++ b/ydb/public/lib/ydb_cli/commands/tpch_schema.sql @@ -2,13 +2,13 @@ CREATE {external} TABLE `{path}customer` ( c_acctbal Double {notnull}, -- it should be Decimal(12, 2) - c_address String {notnull}, - c_comment String {notnull}, + c_address Utf8 {notnull}, + c_comment Utf8 {notnull}, c_custkey Int64 {notnull}, -- Identifier - c_mktsegment String {notnull}, - c_name String {notnull}, + c_mktsegment Utf8 {notnull}, + c_name Utf8 {notnull}, c_nationkey Int32 {notnull}, -- FK to N_NATIONKEY - c_phone String {notnull} + c_phone Utf8 {notnull} {primary_key} (c_custkey) ) {partition_customer} @@ -17,20 +17,20 @@ WITH ({store}"{s3_prefix}/customer/" ); CREATE {external} TABLE `{path}lineitem` ( - l_comment String {notnull}, + l_comment Utf8 {notnull}, l_commitdate Date {notnull}, l_discount Double {notnull}, -- it should be Decimal(12, 2) l_extendedprice Double {notnull}, -- it should be Decimal(12, 2) l_linenumber Int32 {notnull}, - l_linestatus String {notnull}, + l_linestatus Utf8 {notnull}, l_orderkey Int64 {notnull}, -- FK to O_ORDERKEY l_partkey Int64 {notnull}, -- FK to P_PARTKEY, first part of the compound FK to (PS_PARTKEY, PS_SUPPKEY) with L_SUPPKEY l_quantity Double {notnull}, -- it should be Decimal(12, 2) l_receiptdate Date {notnull}, - l_returnflag String {notnull}, + l_returnflag Utf8 {notnull}, l_shipdate Date {notnull}, - l_shipinstruct String {notnull}, - l_shipmode String {notnull}, + l_shipinstruct Utf8 {notnull}, + l_shipmode Utf8 {notnull}, l_suppkey Int64 {notnull}, -- FK to S_SUPPKEY, second part of the compound FK to (PS_PARTKEY, PS_SUPPKEY) with L_PARTKEY l_tax Double {notnull} -- it should be Decimal(12, 2) {primary_key} (l_orderkey, l_linenumber) @@ -41,8 +41,8 @@ WITH ({store}"{s3_prefix}/lineitem/" ); CREATE {external} TABLE `{path}nation` ( - n_comment String {notnull}, - n_name String {notnull}, + n_comment Utf8 {notnull}, + n_name Utf8 {notnull}, n_nationkey Int32 {notnull}, -- Identifier n_regionkey Int32 {notnull} -- FK to R_REGIONKEY {primary_key}(n_nationkey) @@ -53,13 +53,13 @@ WITH ({store}"{s3_prefix}/nation/" ); CREATE {external} TABLE `{path}orders` ( - o_clerk String {notnull}, - o_comment String {notnull}, + o_clerk Utf8 {notnull}, + o_comment Utf8 {notnull}, o_custkey Int64 {notnull}, -- FK to C_CUSTKEY o_orderdate Date {notnull}, o_orderkey Int64 {notnull}, -- Identifier - o_orderpriority String {notnull}, - o_orderstatus String {notnull}, + o_orderpriority Utf8 {notnull}, + o_orderstatus Utf8 {notnull}, o_shippriority Int32 {notnull}, o_totalprice Double {notnull} -- it should be Decimal(12, 2) {primary_key} (o_orderkey) @@ -70,15 +70,15 @@ WITH ({store}"{s3_prefix}/orders/" ); CREATE {external} TABLE `{path}part` ( - p_brand String {notnull}, - p_comment String {notnull}, - p_container String {notnull}, - p_mfgr String {notnull}, - p_name String {notnull}, + p_brand Utf8 {notnull}, + p_comment Utf8 {notnull}, + p_container Utf8 {notnull}, + p_mfgr Utf8 {notnull}, + p_name Utf8 {notnull}, p_partkey Int64 {notnull}, -- Identifier p_retailprice Double {notnull}, -- it should be Decimal(12, 2) p_size Int32 {notnull}, - p_type String {notnull} + p_type Utf8 {notnull} {primary_key}(p_partkey) ) {partition_part} @@ -88,7 +88,7 @@ WITH ({store}"{s3_prefix}/part/" CREATE {external} TABLE `{path}partsupp` ( ps_availqty Int32 {notnull}, - ps_comment String {notnull}, + ps_comment Utf8 {notnull}, ps_partkey Int64 {notnull}, -- FK to P_PARTKEY ps_suppkey Int64 {notnull}, -- FK to S_SUPPKEY ps_supplycost Double {notnull} -- it should be Decimal(12, 2) @@ -100,8 +100,8 @@ WITH ({store}"{s3_prefix}/partsupp/" ); CREATE {external} TABLE `{path}region` ( - r_comment String {notnull}, - r_name String {notnull}, + r_comment Utf8 {notnull}, + r_name Utf8 {notnull}, r_regionkey Int32 {notnull} -- Identifier {primary_key}(r_regionkey) ) @@ -112,11 +112,11 @@ WITH ({store}"{s3_prefix}/region/" CREATE {external} TABLE `{path}supplier` ( s_acctbal Double {notnull}, -- it should be Decimal(12, 2) - s_address String {notnull}, - s_comment String {notnull}, - s_name String {notnull}, + s_address Utf8 {notnull}, + s_comment Utf8 {notnull}, + s_name Utf8 {notnull}, s_nationkey Int32 {notnull}, -- FK to N_NATIONKEY - s_phone String {notnull}, + s_phone Utf8 {notnull}, s_suppkey Int64 {notnull} -- Identifier {primary_key}(s_suppkey) ) |