diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/DescribeStmt.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/DescribeStmt.java index 9602aefbdc9f60c..4e8b12c7ab83d3e 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/analysis/DescribeStmt.java +++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/DescribeStmt.java @@ -238,22 +238,22 @@ public void analyze(Analyzer analyzer) throws UserException { ""); if (column.getOriginType().isDatetimeV2()) { - StringBuilder typeStr = new StringBuilder("DATETIME"); + StringBuilder typeStr = new StringBuilder("datetime"); if (((ScalarType) column.getOriginType()).getScalarScale() > 0) { typeStr.append("(").append(((ScalarType) column.getOriginType()).getScalarScale()) .append(")"); } row.set(3, typeStr.toString()); } else if (column.getOriginType().isDateV2()) { - row.set(3, "DATE"); + row.set(3, "date"); } else if (column.getOriginType().isDecimalV3()) { - StringBuilder typeStr = new StringBuilder("DECIMAL"); + StringBuilder typeStr = new StringBuilder("decimal"); ScalarType sType = (ScalarType) column.getOriginType(); int scale = sType.getScalarScale(); int precision = sType.getScalarPrecision(); // not default if (scale > 0 && precision != 9) { - typeStr.append("(").append(precision).append(", ").append(scale) + typeStr.append("(").append(precision).append(",").append(scale) .append(")"); } row.set(3, typeStr.toString()); diff --git a/regression-test/data/datatype_p0/decimalv3/test_show_decimalv3.out b/regression-test/data/datatype_p0/decimalv3/test_show_decimalv3.out index 6c49a4f011f23b0..2d3715e48d48d9c 100644 --- a/regression-test/data/datatype_p0/decimalv3/test_show_decimalv3.out +++ b/regression-test/data/datatype_p0/decimalv3/test_show_decimalv3.out @@ -1,17 +1,17 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !select1 -- -id int No true \N -dd decimal(15, 6) Yes false \N NONE +id INT No true \N +dd DECIMAL(15, 6) Yes false \N NONE -- !select2 -- -showdb UNIQUE_KEYS id int int No true \N true - dd DECIMAL(15, 6) decimalv3(15,6) Yes false \N NONE true +showdb UNIQUE_KEYS id INT INT No true \N true + dd DECIMAL(15, 6) DECIMALV3(15, 6) Yes false \N NONE true -- !select3 -- -id int No true \N -dd decimal Yes false \N NONE +id INT No true \N +dd DECIMAL(38, 9) Yes false \N NONE -- !select4 -- -showdb UNIQUE_KEYS id int int No true \N true - dd DECIMAL decimalv3(9,0) Yes false \N NONE true +showdb UNIQUE_KEYS id INT INT No true \N true + dd DECIMAL(38, 9) DECIMALV3(38, 9) Yes false \N NONE true diff --git a/regression-test/data/ddl_p0/test_create_table_like.out b/regression-test/data/ddl_p0/test_create_table_like.out index 13e0cf1d1505223..dd25363ab112c41 100644 --- a/regression-test/data/ddl_p0/test_create_table_like.out +++ b/regression-test/data/ddl_p0/test_create_table_like.out @@ -1,22 +1,22 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !desc_create_table -- -decimal_test DUP_KEYS name varchar(65533) varchar(65533) Yes true \N true - id smallint smallint Yes false \N NONE true - timestamp0 DECIMAL decimalv3(9,0) Yes false \N NONE true - timestamp1 DECIMAL decimalv3(10,0) Yes false \N NONE true - timestamp2 DECIMAL(10, 1) decimalv3(10,1) Yes false \N NONE true - timestamp3 DECIMAL decimalv3(10,0) Yes false \N NONE true - timestamp4 DECIMAL(10, 1) decimalv3(10,1) Yes false \N NONE true +decimal_test DUP_KEYS name VARCHAR(65533) VARCHAR(65533) Yes true \N true + id SMALLINT SMALLINT Yes false \N NONE true + timestamp0 DECIMAL(38, 9) DECIMALV3(38, 9) Yes false \N NONE true + timestamp1 DECIMAL DECIMALV3(10, 0) Yes false \N NONE true + timestamp2 DECIMAL(10, 1) DECIMALV3(10, 1) Yes false \N NONE true + timestamp3 DECIMAL DECIMALV3(10, 0) Yes false \N NONE true + timestamp4 DECIMAL(10, 1) DECIMALV3(10, 1) Yes false \N NONE true -- !desc_create_table_like -- -decimal_test_like DUP_KEYS name varchar(65533) varchar(65533) Yes true \N true - id smallint smallint Yes false \N NONE true - timestamp0 DECIMAL decimalv3(9,0) Yes false \N NONE true - timestamp1 DECIMAL decimalv3(10,0) Yes false \N NONE true - timestamp2 DECIMAL(10, 1) decimalv3(10,1) Yes false \N NONE true - timestamp3 DECIMAL decimalv3(10,0) Yes false \N NONE true - timestamp4 DECIMAL(10, 1) decimalv3(10,1) Yes false \N NONE true +decimal_test_like DUP_KEYS name VARCHAR(65533) VARCHAR(65533) Yes true \N true + id SMALLINT SMALLINT Yes false \N NONE true + timestamp0 DECIMAL(38, 9) DECIMALV3(38, 9) Yes false \N NONE true + timestamp1 DECIMAL DECIMALV3(10, 0) Yes false \N NONE true + timestamp2 DECIMAL(10, 1) DECIMALV3(10, 1) Yes false \N NONE true + timestamp3 DECIMAL DECIMALV3(10, 0) Yes false \N NONE true + timestamp4 DECIMAL(10, 1) DECIMALV3(10, 1) Yes false \N NONE true -- !select_table_like -- -test1 1 123456789 1234567891 123456789.0 1234567891 123456789.0 +test1 1 123456789.000000000 1234567891 123456789.0 1234567891 123456789.0 diff --git a/regression-test/data/nereids_syntax_p0/rollup/agg_date.out b/regression-test/data/nereids_syntax_p0/rollup/agg_date.out index 3c85f24c2e69b82..17fc18fae25d1df 100644 --- a/regression-test/data/nereids_syntax_p0/rollup/agg_date.out +++ b/regression-test/data/nereids_syntax_p0/rollup/agg_date.out @@ -1,23 +1,23 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !sql -- -test_rollup_agg_date1 AGG_KEYS datek1 DATE datev2 Yes true \N true - datetimek1 DATETIME datetimev2(0) Yes true \N true - datetimek2 DATETIME(3) datetimev2(3) Yes true \N true - datetimek3 DATETIME(6) datetimev2(6) Yes true \N true - datev1 DATE datev2 No false \N MAX true - datetimev1 DATETIME datetimev2(0) No false \N MAX true - datetimev2 DATETIME(3) datetimev2(3) No false \N MAX true - datetimev3 DATETIME(6) datetimev2(6) No false \N MAX true - datetimev4 DATETIME(3) datetimev2(3) Yes false \N MAX true +test_rollup_agg_date1 AGG_KEYS datek1 DATE DATEV2 Yes true \N true + datetimek1 DATETIME DATETIMEV2(0) Yes true \N true + datetimek2 DATETIME(3) DATETIMEV2(3) Yes true \N true + datetimek3 DATETIME(6) DATETIMEV2(6) Yes true \N true + datev1 DATE DATEV2 No false \N MAX true + datetimev1 DATETIME DATETIMEV2(0) No false \N MAX true + datetimev2 DATETIME(3) DATETIMEV2(3) No false \N MAX true + datetimev3 DATETIME(6) DATETIMEV2(6) No false \N MAX true + datetimev4 DATETIME(3) DATETIMEV2(3) Yes false \N MAX true -rollup_date AGG_KEYS datek1 DATE datev2 Yes true \N true - datetimek2 DATETIME(3) datetimev2(3) Yes true \N true - datetimek1 DATETIME datetimev2(0) Yes true \N true - datetimek3 DATETIME(6) datetimev2(6) Yes true \N true - datev1 DATE datev2 No false \N MAX true - datetimev1 DATETIME datetimev2(0) No false \N MAX true - datetimev2 DATETIME(3) datetimev2(3) No false \N MAX true - datetimev3 DATETIME(6) datetimev2(6) No false \N MAX true +rollup_date AGG_KEYS datek1 DATE DATEV2 Yes true \N true + datetimek2 DATETIME(3) DATETIMEV2(3) Yes true \N true + datetimek1 DATETIME DATETIMEV2(0) Yes true \N true + datetimek3 DATETIME(6) DATETIMEV2(6) Yes true \N true + datev1 DATE DATEV2 No false \N MAX true + datetimev1 DATETIME DATETIMEV2(0) No false \N MAX true + datetimev2 DATETIME(3) DATETIMEV2(3) No false \N MAX true + datetimev3 DATETIME(6) DATETIMEV2(6) No false \N MAX true -- !sql -- 2022-08-23 2022-08-23T11:11:11 2022-08-23T11:11:11.111 2022-08-23T11:11:11.111111 2022-08-23 2022-08-23T11:11:11 2022-08-23T11:11:11.111 2022-08-23T11:11:11.111111 diff --git a/regression-test/data/nereids_syntax_p0/rollup/hll/hll.out b/regression-test/data/nereids_syntax_p0/rollup/hll/hll.out index 28613c99b80a7f3..28ee1fc66c35b99 100644 --- a/regression-test/data/nereids_syntax_p0/rollup/hll/hll.out +++ b/regression-test/data/nereids_syntax_p0/rollup/hll/hll.out @@ -3,12 +3,12 @@ 1 1 -- !sql -- -test_materialized_view_hll1 DUP_KEYS record_id int int Yes true \N true - seller_id int int Yes true \N true - store_id int int Yes true \N true - sale_date DATE datev2 Yes false \N NONE true - sale_amt bigint bigint Yes false \N NONE true +test_materialized_view_hll1 DUP_KEYS record_id INT INT Yes true \N true + seller_id INT INT Yes true \N true + store_id INT INT Yes true \N true + sale_date DATE DATEV2 Yes false \N NONE true + sale_amt BIGINT BIGINT Yes false \N NONE true -amt_count AGG_KEYS mv_store_id int int Yes true \N true `store_id` - mva_HLL_UNION__hll_hash(CAST(`sale_amt` AS varchar(65533))) hll hll No false \N HLL_UNION true hll_hash(CAST(`sale_amt` AS varchar(65533))) +amt_count AGG_KEYS mv_store_id INT INT Yes true \N true `store_id` + mva_HLL_UNION__hll_hash(CAST(`sale_amt` AS VARCHAR(65533))) HLL HLL No false \N HLL_UNION true hll_hash(CAST(`sale_amt` AS VARCHAR(65533))) diff --git a/regression-test/data/nereids_syntax_p0/rollup/hll_with_light_sc/hll_with_light_sc.out b/regression-test/data/nereids_syntax_p0/rollup/hll_with_light_sc/hll_with_light_sc.out index b348514c97bf521..4018c44c9389c8e 100644 --- a/regression-test/data/nereids_syntax_p0/rollup/hll_with_light_sc/hll_with_light_sc.out +++ b/regression-test/data/nereids_syntax_p0/rollup/hll_with_light_sc/hll_with_light_sc.out @@ -1,13 +1,13 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !sql -- -test_materialized_view_hll_with_light_sc1 DUP_KEYS record_id int int Yes true \N true - seller_id int int Yes true \N true - store_id int int Yes true \N true - sale_date DATE datev2 Yes false \N NONE true - sale_amt bigint bigint Yes false \N NONE true +test_materialized_view_hll_with_light_sc1 DUP_KEYS record_id INT INT Yes true \N true + seller_id INT INT Yes true \N true + store_id INT INT Yes true \N true + sale_date DATE DATEV2 Yes false \N NONE true + sale_amt BIGINT BIGINT Yes false \N NONE true -amt_count1 AGG_KEYS mv_store_id int int Yes true \N true `store_id` - mva_HLL_UNION__hll_hash(CAST(`sale_amt` AS varchar(65533))) hll hll No false \N HLL_UNION true hll_hash(CAST(`sale_amt` AS varchar(65533))) +amt_count1 AGG_KEYS mv_store_id INT INT Yes true \N true `store_id` + mva_HLL_UNION__hll_hash(CAST(`sale_amt` AS VARCHAR(65533))) HLL HLL No false \N HLL_UNION true hll_hash(CAST(`sale_amt` AS VARCHAR(65533))) -- !sql -- 1 1 diff --git a/regression-test/data/rollup/test_materialized_view_hll.out b/regression-test/data/rollup/test_materialized_view_hll.out index 99dcf35a1ce41a7..9721b8612c6d768 100644 --- a/regression-test/data/rollup/test_materialized_view_hll.out +++ b/regression-test/data/rollup/test_materialized_view_hll.out @@ -1,13 +1,13 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !sql -- -test_materialized_view_hll DUP_KEYS record_id int int Yes true \N true - seller_id int int Yes true \N true - store_id int int Yes true \N true - sale_date DATE datev2 Yes false \N NONE true - sale_amt bigint bigint Yes false \N NONE true +test_materialized_view_hll DUP_KEYS record_id INT INT Yes true \N true + seller_id INT INT Yes true \N true + store_id INT INT Yes true \N true + sale_date DATE DATEV2 Yes false \N NONE true + sale_amt BIGINT BIGINT Yes false \N NONE true -amt_count AGG_KEYS mv_store_id int int Yes true \N true `store_id` - mva_HLL_UNION__hll_hash(CAST(`sale_amt` AS varchar(65533))) hll hll No false \N HLL_UNION true hll_hash(CAST(`sale_amt` AS varchar(65533))) +amt_count AGG_KEYS mv_store_id INT INT Yes true \N true `store_id` + mva_HLL_UNION__hll_hash(CAST(`sale_amt` AS VARCHAR(65533))) HLL HLL No false \N HLL_UNION true hll_hash(CAST(`sale_amt` AS VARCHAR(65533))) -- !sql -- 1 1 diff --git a/regression-test/data/rollup/test_materialized_view_hll_with_light_sc.out b/regression-test/data/rollup/test_materialized_view_hll_with_light_sc.out index 1cbbfd15953b83b..bdc8e1cd81f6295 100644 --- a/regression-test/data/rollup/test_materialized_view_hll_with_light_sc.out +++ b/regression-test/data/rollup/test_materialized_view_hll_with_light_sc.out @@ -1,13 +1,13 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !sql -- -test_materialized_view_hll_with_light_sc DUP_KEYS record_id int int Yes true \N true - seller_id int int Yes true \N true - store_id int int Yes true \N true - sale_date DATE datev2 Yes false \N NONE true - sale_amt bigint bigint Yes false \N NONE true +test_materialized_view_hll_with_light_sc DUP_KEYS record_id INT INT Yes true \N true + seller_id INT INT Yes true \N true + store_id INT INT Yes true \N true + sale_date DATE DATEV2 Yes false \N NONE true + sale_amt BIGINT BIGINT Yes false \N NONE true -amt_count1 AGG_KEYS mv_store_id int int Yes true \N true `store_id` - mva_HLL_UNION__hll_hash(CAST(`sale_amt` AS varchar(65533))) hll hll No false \N HLL_UNION true hll_hash(CAST(`sale_amt` AS varchar(65533))) +amt_count1 AGG_KEYS mv_store_id INT INT Yes true \N true `store_id` + mva_HLL_UNION__hll_hash(CAST(`sale_amt` AS VARCHAR(65533))) HLL HLL No false \N HLL_UNION true hll_hash(CAST(`sale_amt` AS VARCHAR(65533))) -- !sql -- 1 1 diff --git a/regression-test/data/rollup_p0/test_materialized_view.out b/regression-test/data/rollup_p0/test_materialized_view.out index ee9cdda99a3a7be..7caf3713fe743c6 100644 --- a/regression-test/data/rollup_p0/test_materialized_view.out +++ b/regression-test/data/rollup_p0/test_materialized_view.out @@ -1,24 +1,24 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !sql -- -test_materialized_view1 DUP_KEYS record_id int int Yes true \N true - seller_id int int Yes true \N true - store_id int int Yes true \N true - sale_date DATE datev2 Yes false \N NONE true - sale_amt bigint bigint Yes false \N NONE true +test_materialized_view1 DUP_KEYS record_id INT INT Yes true \N true + seller_id INT INT Yes true \N true + store_id INT INT Yes true \N true + sale_date DATE DATEV2 Yes false \N NONE true + sale_amt BIGINT BIGINT Yes false \N NONE true -amt_sum AGG_KEYS mv_store_id int int Yes true \N true `store_id` - mva_SUM__`sale_amt` bigint bigint Yes false \N SUM true `sale_amt` +amt_sum AGG_KEYS mv_store_id INT INT Yes true \N true `store_id` + mva_SUM__`sale_amt` BIGINT BIGINT Yes false \N SUM true `sale_amt` -- !sql -- -test_materialized_view2 DUP_KEYS record_id int int Yes true \N true - seller_id int int Yes true \N true - store_id int int Yes true \N true - sale_date DATE datev2 Yes false \N NONE true - sale_amt bigint bigint Yes false \N NONE true +test_materialized_view2 DUP_KEYS record_id INT INT Yes true \N true + seller_id INT INT Yes true \N true + store_id INT INT Yes true \N true + sale_date DATE DATEV2 Yes false \N NONE true + sale_amt BIGINT BIGINT Yes false \N NONE true -seller_id_order DUP_KEYS mv_store_id int int Yes true \N true `store_id` - mv_seller_id int int Yes true \N true `seller_id` - mv_sale_amt bigint bigint Yes false \N NONE true `sale_amt` +seller_id_order DUP_KEYS mv_store_id INT INT Yes true \N true `store_id` + mv_seller_id INT INT Yes true \N true `seller_id` + mv_sale_amt BIGINT BIGINT Yes false \N NONE true `sale_amt` -- !sql -- 1 1 1 2020-05-30 100 @@ -37,15 +37,15 @@ seller_id_order DUP_KEYS mv_store_id int int Yes true \N true `store_id` -- !sql -- - mva_SUM__CASE WHEN `sale_amt` IS NULL THEN 0 ELSE 1 END bigint bigint No false \N SUM true CASE WHEN `sale_amt` IS NULL THEN 0 ELSE 1 END - mva_SUM__`sale_amt` bigint bigint Yes false \N SUM true `sale_amt` - sale_amt bigint bigint Yes false \N NONE true - sale_date DATE datev2 Yes false \N NONE true - seller_id int int Yes true \N true - store_id int int Yes true \N true -amt_count AGG_KEYS mv_store_id int int Yes true \N true `store_id` -amt_sum AGG_KEYS mv_store_id int int Yes true \N true `store_id` -test_materialized_view1 DUP_KEYS record_id int int Yes true \N true + mva_SUM__CASE WHEN `sale_amt` IS NULL THEN 0 ELSE 1 END BIGINT BIGINT No false \N SUM true CASE WHEN `sale_amt` IS NULL THEN 0 ELSE 1 END + mva_SUM__`sale_amt` BIGINT BIGINT Yes false \N SUM true `sale_amt` + sale_amt BIGINT BIGINT Yes false \N NONE true + sale_date DATE DATEV2 Yes false \N NONE true + seller_id INT INT Yes true \N true + store_id INT INT Yes true \N true +amt_count AGG_KEYS mv_store_id INT INT Yes true \N true `store_id` +amt_sum AGG_KEYS mv_store_id INT INT Yes true \N true `store_id` +test_materialized_view1 DUP_KEYS record_id INT INT Yes true \N true -- !sql -- 1 2 diff --git a/regression-test/data/rollup_p0/test_rollup_agg_date.out b/regression-test/data/rollup_p0/test_rollup_agg_date.out index dddd46df900644a..c1b9d49855aa6ef 100644 --- a/regression-test/data/rollup_p0/test_rollup_agg_date.out +++ b/regression-test/data/rollup_p0/test_rollup_agg_date.out @@ -1,23 +1,23 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !sql -- -test_rollup_agg_date AGG_KEYS datek1 DATE datev2 Yes true \N true - datetimek1 DATETIME datetimev2(0) Yes true \N true - datetimek2 DATETIME(3) datetimev2(3) Yes true \N true - datetimek3 DATETIME(6) datetimev2(6) Yes true \N true - datev1 DATE datev2 No false \N MAX true - datetimev1 DATETIME datetimev2(0) No false \N MAX true - datetimev2 DATETIME(3) datetimev2(3) No false \N MAX true - datetimev3 DATETIME(6) datetimev2(6) No false \N MAX true - datetimev4 DATETIME(3) datetimev2(3) Yes false \N MAX true +test_rollup_agg_date AGG_KEYS datek1 DATE DATEV2 Yes true \N true + datetimek1 DATETIME DATETIMEV2(0) Yes true \N true + datetimek2 DATETIME(3) DATETIMEV2(3) Yes true \N true + datetimek3 DATETIME(6) DATETIMEV2(6) Yes true \N true + datev1 DATE DATEV2 No false \N MAX true + datetimev1 DATETIME DATETIMEV2(0) No false \N MAX true + datetimev2 DATETIME(3) DATETIMEV2(3) No false \N MAX true + datetimev3 DATETIME(6) DATETIMEV2(6) No false \N MAX true + datetimev4 DATETIME(3) DATETIMEV2(3) Yes false \N MAX true -rollup_date AGG_KEYS datek1 DATE datev2 Yes true \N true - datetimek2 DATETIME(3) datetimev2(3) Yes true \N true - datetimek1 DATETIME datetimev2(0) Yes true \N true - datetimek3 DATETIME(6) datetimev2(6) Yes true \N true - datev1 DATE datev2 No false \N MAX true - datetimev1 DATETIME datetimev2(0) No false \N MAX true - datetimev2 DATETIME(3) datetimev2(3) No false \N MAX true - datetimev3 DATETIME(6) datetimev2(6) No false \N MAX true +rollup_date AGG_KEYS datek1 DATE DATEV2 Yes true \N true + datetimek2 DATETIME(3) DATETIMEV2(3) Yes true \N true + datetimek1 DATETIME DATETIMEV2(0) Yes true \N true + datetimek3 DATETIME(6) DATETIMEV2(6) Yes true \N true + datev1 DATE DATEV2 No false \N MAX true + datetimev1 DATETIME DATETIMEV2(0) No false \N MAX true + datetimev2 DATETIME(3) DATETIMEV2(3) No false \N MAX true + datetimev3 DATETIME(6) DATETIMEV2(6) No false \N MAX true -- !sql -- 2022-08-23 2022-08-23T11:11:11 2022-08-23T11:11:11.111 2022-08-23T11:11:11.111111 2022-08-23 2022-08-23T11:11:11 2022-08-23T11:11:11.111 2022-08-23T11:11:11.111111 diff --git a/regression-test/data/schema_change_p0/schema_change_modify_mv_column_type.out b/regression-test/data/schema_change_p0/schema_change_modify_mv_column_type.out index f9980ff895b75b6..5571bf88a262c28 100644 --- a/regression-test/data/schema_change_p0/schema_change_modify_mv_column_type.out +++ b/regression-test/data/schema_change_p0/schema_change_modify_mv_column_type.out @@ -9,8 +9,8 @@ tbl_scalar_types_dup DUP_KEYS k1 bigint bigint Yes true \N true c_largeint largeint largeint Yes false \N NONE true c_float float float Yes false \N NONE true c_double double double Yes false \N NONE true - c_decimal decimal(20, 3) decimalv3(20, 3) Yes false \N NONE true - c_decimalv3 decimal(20, 3) decimalv3(20, 3) Yes false \N NONE true + c_decimal decimal(20,3) decimalv3(20,3) Yes false \N NONE true + c_decimalv3 decimal(20,3) decimalv3(20,3) Yes false \N NONE true c_date date datev2 Yes false \N NONE true c_datetime datetime datetimev2(0) Yes false \N NONE true c_datev2 date datev2 Yes false \N NONE true @@ -18,7 +18,7 @@ tbl_scalar_types_dup DUP_KEYS k1 bigint bigint Yes true \N true c_char char(15) char(15) Yes false \N NONE true c_varchar varchar(100) varchar(100) Yes false \N NONE true c_string text text Yes false \N NONE true - + mv_tbl_scalar_types_dup_1 DUP_KEYS mv_c_tinyint tinyint tinyint Yes true \N true `c_tinyint` mv_c_bool boolean boolean Yes true \N true `c_bool` mv_k1 bigint bigint Yes true \N true `k1` @@ -28,13 +28,13 @@ mv_tbl_scalar_types_dup_1 DUP_KEYS mv_c_tinyint tinyint tinyint Yes true \N tru mv_c_largeint largeint largeint Yes false \N NONE true `c_largeint` mv_c_float float float Yes false \N NONE true `c_float` mv_c_double double double Yes false \N NONE true `c_double` - mv_c_decimal decimal(20, 3) decimalv3(20, 3) Yes false \N NONE true `c_decimal` - mv_c_decimalv3 decimal(20, 3) decimalv3(20, 3) Yes false \N NONE true `c_decimalv3` + mv_c_decimal decimal(20,3) decimalv3(20,3) Yes false \N NONE true `c_decimal` + mv_c_decimalv3 decimal(20,3) decimalv3(20,3) Yes false \N NONE true `c_decimalv3` mv_c_date date datev2 Yes false \N NONE true `c_date` mv_c_datetime datetime datetimev2(0) Yes false \N NONE true `c_datetime` mv_c_datev2 date datev2 Yes false \N NONE true `c_datev2` mv_c_datetimev2 datetime datetimev2(0) Yes false \N NONE true `c_datetimev2` - mv_c_char character character Yes false \N NONE true `c_char` + mv_c_char character(255) character(255) Yes false \N NONE true `c_char` mv_c_varchar varchar(65533) varchar(65533) Yes false \N NONE true `c_varchar` mv_c_string text text Yes false \N NONE true `c_string` @@ -72,8 +72,8 @@ tbl_scalar_types_dup DUP_KEYS k1 bigint bigint Yes true \N true c_largeint largeint largeint Yes false \N NONE true c_float float float Yes false \N NONE true c_double double double Yes false \N NONE true - c_decimal decimal(20, 3) decimalv3(20, 3) Yes false \N NONE true - c_decimalv3 decimal(20, 3) decimalv3(20, 3) Yes false \N NONE true + c_decimal decimal(20,3) decimalv3(20,3) Yes false \N NONE true + c_decimalv3 decimal(20,3) decimalv3(20,3) Yes false \N NONE true c_date date datev2 Yes false \N NONE true c_datetime datetime datetimev2(0) Yes false \N NONE true c_datev2 date datev2 Yes false \N NONE true @@ -81,7 +81,7 @@ tbl_scalar_types_dup DUP_KEYS k1 bigint bigint Yes true \N true c_char char(15) char(15) Yes false \N NONE true c_varchar varchar(100) varchar(100) Yes false \N NONE true c_string text text Yes false \N NONE true - + mv_tbl_scalar_types_dup_1 DUP_KEYS mv_c_tinyint tinyint tinyint Yes true \N true `c_tinyint` mv_c_bool boolean boolean Yes true \N true `c_bool` mv_k1 bigint bigint Yes true \N true `k1` @@ -91,13 +91,13 @@ mv_tbl_scalar_types_dup_1 DUP_KEYS mv_c_tinyint tinyint tinyint Yes true \N tru mv_c_largeint largeint largeint Yes false \N NONE true `c_largeint` mv_c_float float float Yes false \N NONE true `c_float` mv_c_double double double Yes false \N NONE true `c_double` - mv_c_decimal decimal(20, 3) decimalv3(20, 3) Yes false \N NONE true `c_decimal` - mv_c_decimalv3 decimal(20, 3) decimalv3(20, 3) Yes false \N NONE true `c_decimalv3` + mv_c_decimal decimal(20,3) decimalv3(20,3) Yes false \N NONE true `c_decimal` + mv_c_decimalv3 decimal(20,3) decimalv3(20,3) Yes false \N NONE true `c_decimalv3` mv_c_date date datev2 Yes false \N NONE true `c_date` mv_c_datetime datetime datetimev2(0) Yes false \N NONE true `c_datetime` mv_c_datev2 date datev2 Yes false \N NONE true `c_datev2` mv_c_datetimev2 datetime datetimev2(0) Yes false \N NONE true `c_datetimev2` - mv_c_char character character Yes false \N NONE true `c_char` + mv_c_char character(255) character(255) Yes false \N NONE true `c_char` mv_c_varchar varchar(65533) varchar(65533) Yes false \N NONE true `c_varchar` mv_c_string text text Yes false \N NONE true `c_string` diff --git a/regression-test/data/schema_change_p0/schema_change_modify_mv_column_type2.out b/regression-test/data/schema_change_p0/schema_change_modify_mv_column_type2.out index 287d1366a4badd6..e8f586247cb840e 100644 --- a/regression-test/data/schema_change_p0/schema_change_modify_mv_column_type2.out +++ b/regression-test/data/schema_change_p0/schema_change_modify_mv_column_type2.out @@ -1,28 +1,28 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !sql -- -tbl_scalar_types_dup DUP_KEYS k1 bigint bigint Yes true \N true - c_bool boolean boolean Yes false \N NONE true - c_tinyint tinyint tinyint Yes false \N NONE true - c_smallint smallint smallint Yes false \N NONE true - c_int int int Yes false \N NONE true - c_bigint bigint bigint Yes false \N NONE true - c_largeint largeint largeint Yes false \N NONE true - c_float float float Yes false \N NONE true - c_double double double Yes false \N NONE true - c_decimal DECIMAL(20, 3) decimalv3(20,3) Yes false \N NONE true - c_decimalv3 DECIMAL(20, 3) decimalv3(20,3) Yes false \N NONE true - c_date DATE datev2 Yes false \N NONE true - c_datetime DATETIME datetimev2(0) Yes false \N NONE true - c_datev2 DATE datev2 Yes false \N NONE true - c_datetimev2 DATETIME datetimev2(0) Yes false \N NONE true - c_char char(15) char(15) Yes false \N NONE true - c_varchar varchar(100) varchar(100) Yes false \N NONE true - c_string text text Yes false \N NONE true +tbl_scalar_types_dup DUP_KEYS k1 BIGINT BIGINT Yes true \N true + c_bool BOOLEAN BOOLEAN Yes false \N NONE true + c_tinyint TINYINT TINYINT Yes false \N NONE true + c_smallint SMALLINT SMALLINT Yes false \N NONE true + c_int INT INT Yes false \N NONE true + c_bigint BIGINT BIGINT Yes false \N NONE true + c_largeint LARGEINT LARGEINT Yes false \N NONE true + c_float FLOAT FLOAT Yes false \N NONE true + c_double DOUBLE DOUBLE Yes false \N NONE true + c_decimal DECIMAL(20, 3) DECIMALV3(20, 3) Yes false \N NONE true + c_decimalv3 DECIMAL(20, 3) DECIMALV3(20, 3) Yes false \N NONE true + c_date DATE DATEV2 Yes false \N NONE true + c_datetime DATETIME DATETIMEV2(0) Yes false \N NONE true + c_datev2 DATE DATEV2 Yes false \N NONE true + c_datetimev2 DATETIME DATETIMEV2(0) Yes false \N NONE true + c_char CHAR(15) CHAR(15) Yes false \N NONE true + c_varchar VARCHAR(100) VARCHAR(100) Yes false \N NONE true + c_string TEXT TEXT Yes false \N NONE true -mv_tbl_scalar_types_dup_2 AGG_KEYS mv_k1 bigint bigint Yes true \N true `k1` - mva_SUM__CAST(`c_int` AS bigint) bigint bigint Yes false \N SUM true CAST(`c_int` AS bigint) - mva_MAX__`c_int` int int Yes false \N MAX true `c_int` - mva_MIN__`c_int` int int Yes false \N MIN true `c_int` +mv_tbl_scalar_types_dup_2 AGG_KEYS mv_k1 BIGINT BIGINT Yes true \N true `k1` + mva_SUM__CAST(`c_int` AS BIGINT) BIGINT BIGINT Yes false \N SUM true CAST(`c_int` AS BIGINT) + mva_MAX__`c_int` INT INT Yes false \N MAX true `c_int` + mva_MIN__`c_int` INT INT Yes false \N MIN true `c_int` -- !sql -- -2147475406 true 45 23794 -11023 915989078 2115356192 15927.068 1.392557423391501E9 45951348783208518.810 8340516346665031.310 2022-01-26 2022-04-13T11:13:48 2022-01-31 2022-02-16T06:07:21 130.50.6.0 DeniseMatthews@Yozio.mil Londonderry Alley 61 @@ -49,27 +49,27 @@ mv_tbl_scalar_types_dup_2 AGG_KEYS mv_k1 bigint bigint Yes true \N true `k1` -2102307005 true 10 -23674 24613 -1810828490 -47095409 -14686.167 2.072108685694799E9 39847820962230526.125 584354832299375.156 2022-03-27 2022-02-11T13:46:06 2022-12-25 2022-11-28T09:37:49 213.146.33.250 JuliaSimmons@Zazio.info Eagle Crest Terrace 84 -- !sql -- -tbl_scalar_types_dup DUP_KEYS k1 bigint bigint Yes true \N true - c_bool boolean boolean Yes false \N NONE true - c_tinyint tinyint tinyint Yes false \N NONE true - c_smallint smallint smallint Yes false \N NONE true - c_int bigint bigint Yes false \N NONE true - c_bigint bigint bigint Yes false \N NONE true - c_largeint largeint largeint Yes false \N NONE true - c_float float float Yes false \N NONE true - c_double double double Yes false \N NONE true - c_decimal DECIMAL(20, 3) decimalv3(20,3) Yes false \N NONE true - c_decimalv3 DECIMAL(20, 3) decimalv3(20,3) Yes false \N NONE true - c_date DATE datev2 Yes false \N NONE true - c_datetime DATETIME datetimev2(0) Yes false \N NONE true - c_datev2 DATE datev2 Yes false \N NONE true - c_datetimev2 DATETIME datetimev2(0) Yes false \N NONE true - c_char char(15) char(15) Yes false \N NONE true - c_varchar varchar(100) varchar(100) Yes false \N NONE true - c_string text text Yes false \N NONE true +tbl_scalar_types_dup DUP_KEYS k1 BIGINT BIGINT Yes true \N true + c_bool BOOLEAN BOOLEAN Yes false \N NONE true + c_tinyint TINYINT TINYINT Yes false \N NONE true + c_smallint SMALLINT SMALLINT Yes false \N NONE true + c_int BIGINT BIGINT Yes false \N NONE true + c_bigint BIGINT BIGINT Yes false \N NONE true + c_largeint LARGEINT LARGEINT Yes false \N NONE true + c_float FLOAT FLOAT Yes false \N NONE true + c_double DOUBLE DOUBLE Yes false \N NONE true + c_decimal DECIMAL(20, 3) DECIMALV3(20, 3) Yes false \N NONE true + c_decimalv3 DECIMAL(20, 3) DECIMALV3(20, 3) Yes false \N NONE true + c_date DATE DATEV2 Yes false \N NONE true + c_datetime DATETIME DATETIMEV2(0) Yes false \N NONE true + c_datev2 DATE DATEV2 Yes false \N NONE true + c_datetimev2 DATETIME DATETIMEV2(0) Yes false \N NONE true + c_char CHAR(15) CHAR(15) Yes false \N NONE true + c_varchar VARCHAR(100) VARCHAR(100) Yes false \N NONE true + c_string TEXT TEXT Yes false \N NONE true -mv_tbl_scalar_types_dup_2 AGG_KEYS mv_k1 bigint bigint Yes true \N true `k1` - mva_SUM__CAST(`c_int` AS bigint) bigint bigint Yes false \N SUM true CAST(`c_int` AS bigint) - mva_MAX__`c_int` bigint bigint Yes false \N MAX true `c_int` - mva_MIN__`c_int` bigint bigint Yes false \N MIN true `c_int` +mv_tbl_scalar_types_dup_2 AGG_KEYS mv_k1 BIGINT BIGINT Yes true \N true `k1` + mva_SUM__CAST(`c_int` AS BIGINT) BIGINT BIGINT Yes false \N SUM true CAST(`c_int` AS BIGINT) + mva_MAX__`c_int` BIGINT BIGINT Yes false \N MAX true `c_int` + mva_MIN__`c_int` BIGINT BIGINT Yes false \N MIN true `c_int` diff --git a/regression-test/data/schema_change_p0/schema_change_modify_mv_column_type_agg.out b/regression-test/data/schema_change_p0/schema_change_modify_mv_column_type_agg.out index c86341a56862c3e..2de215cbd500acc 100644 --- a/regression-test/data/schema_change_p0/schema_change_modify_mv_column_type_agg.out +++ b/regression-test/data/schema_change_p0/schema_change_modify_mv_column_type_agg.out @@ -1,55 +1,55 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !sql -- -tbl_scalar_types_agg AGG_KEYS k1 bigint bigint Yes true \N true - k2 bigint bigint Yes true \N true - c_bool boolean boolean Yes false \N REPLACE true - c_tinyint tinyint tinyint Yes false \N MIN true - c_smallint smallint smallint Yes false \N MAX true - c_int int int Yes false \N MAX true - c_bigint bigint bigint Yes false \N SUM true - c_largeint largeint largeint Yes false \N MIN true - c_float float float Yes false \N MIN true - c_double double double Yes false \N MAX true - c_decimal DECIMAL(20, 3) decimalv3(20,3) Yes false \N SUM true - c_decimalv3 DECIMAL(20, 3) decimalv3(20,3) Yes false \N SUM true - c_date DATE datev2 Yes false \N REPLACE true - c_datetime DATETIME datetimev2(0) Yes false \N REPLACE true - c_datev2 DATE datev2 Yes false \N REPLACE true - c_datetimev2 DATETIME datetimev2(0) Yes false \N REPLACE true - c_char char(15) char(15) Yes false \N REPLACE true - c_varchar varchar(100) varchar(100) Yes false \N REPLACE true - c_string text text Yes false \N REPLACE true +tbl_scalar_types_agg AGG_KEYS k1 BIGINT BIGINT Yes true \N true + k2 BIGINT BIGINT Yes true \N true + c_bool BOOLEAN BOOLEAN Yes false \N REPLACE true + c_tinyint TINYINT TINYINT Yes false \N MIN true + c_smallint SMALLINT SMALLINT Yes false \N MAX true + c_int INT INT Yes false \N MAX true + c_bigint BIGINT BIGINT Yes false \N SUM true + c_largeint LARGEINT LARGEINT Yes false \N MIN true + c_float FLOAT FLOAT Yes false \N MIN true + c_double DOUBLE DOUBLE Yes false \N MAX true + c_decimal DECIMAL(20, 3) DECIMALV3(20, 3) Yes false \N SUM true + c_decimalv3 DECIMAL(20, 3) DECIMALV3(20, 3) Yes false \N SUM true + c_date DATE DATEV2 Yes false \N REPLACE true + c_datetime DATETIME DATETIMEV2(0) Yes false \N REPLACE true + c_datev2 DATE DATEV2 Yes false \N REPLACE true + c_datetimev2 DATETIME DATETIMEV2(0) Yes false \N REPLACE true + c_char CHAR(15) CHAR(15) Yes false \N REPLACE true + c_varchar VARCHAR(100) VARCHAR(100) Yes false \N REPLACE true + c_string TEXT TEXT Yes false \N REPLACE true -mv_tbl_scalar_types_agg_1 AGG_KEYS mv_k2 bigint bigint Yes true \N true `k2` - mv_k1 bigint bigint Yes true \N true `k1` - mva_MAX__`c_int` int int Yes false \N MAX true `c_int` +mv_tbl_scalar_types_agg_1 AGG_KEYS mv_k2 BIGINT BIGINT Yes true \N true `k2` + mv_k1 BIGINT BIGINT Yes true \N true `k1` + mva_MAX__`c_int` INT INT Yes false \N MAX true `c_int` -- !sql -- -- !sql -- -- !sql -- -tbl_scalar_types_agg AGG_KEYS k1 bigint bigint Yes true \N true - k2 bigint bigint Yes true \N true - c_bool boolean boolean Yes false \N REPLACE true - c_tinyint tinyint tinyint Yes false \N MIN true - c_smallint smallint smallint Yes false \N MAX true - c_int bigint bigint Yes false \N MAX true - c_bigint bigint bigint Yes false \N SUM true - c_largeint largeint largeint Yes false \N MIN true - c_float float float Yes false \N MIN true - c_double double double Yes false \N MAX true - c_decimal DECIMAL(20, 3) decimalv3(20,3) Yes false \N SUM true - c_decimalv3 DECIMAL(20, 3) decimalv3(20,3) Yes false \N SUM true - c_date DATE datev2 Yes false \N REPLACE true - c_datetime DATETIME datetimev2(0) Yes false \N REPLACE true - c_datev2 DATE datev2 Yes false \N REPLACE true - c_datetimev2 DATETIME datetimev2(0) Yes false \N REPLACE true - c_char char(15) char(15) Yes false \N REPLACE true - c_varchar varchar(100) varchar(100) Yes false \N REPLACE true - c_string text text Yes false \N REPLACE true +tbl_scalar_types_agg AGG_KEYS k1 BIGINT BIGINT Yes true \N true + k2 BIGINT BIGINT Yes true \N true + c_bool BOOLEAN BOOLEAN Yes false \N REPLACE true + c_tinyint TINYINT TINYINT Yes false \N MIN true + c_smallint SMALLINT SMALLINT Yes false \N MAX true + c_int BIGINT BIGINT Yes false \N MAX true + c_bigint BIGINT BIGINT Yes false \N SUM true + c_largeint LARGEINT LARGEINT Yes false \N MIN true + c_float FLOAT FLOAT Yes false \N MIN true + c_double DOUBLE DOUBLE Yes false \N MAX true + c_decimal DECIMAL(20, 3) DECIMALV3(20, 3) Yes false \N SUM true + c_decimalv3 DECIMAL(20, 3) DECIMALV3(20, 3) Yes false \N SUM true + c_date DATE DATEV2 Yes false \N REPLACE true + c_datetime DATETIME DATETIMEV2(0) Yes false \N REPLACE true + c_datev2 DATE DATEV2 Yes false \N REPLACE true + c_datetimev2 DATETIME DATETIMEV2(0) Yes false \N REPLACE true + c_char CHAR(15) CHAR(15) Yes false \N REPLACE true + c_varchar VARCHAR(100) VARCHAR(100) Yes false \N REPLACE true + c_string TEXT TEXT Yes false \N REPLACE true -mv_tbl_scalar_types_agg_1 AGG_KEYS mv_k2 bigint bigint Yes true \N true `k2` - mv_k1 bigint bigint Yes true \N true `k1` - mva_MAX__`c_int` bigint bigint Yes false \N MAX true `c_int` +mv_tbl_scalar_types_agg_1 AGG_KEYS mv_k2 BIGINT BIGINT Yes true \N true `k2` + mv_k1 BIGINT BIGINT Yes true \N true `k1` + mva_MAX__`c_int` BIGINT BIGINT Yes false \N MAX true `c_int` diff --git a/regression-test/data/schema_change_p0/test_rename_rollup.out b/regression-test/data/schema_change_p0/test_rename_rollup.out index 6e406ff098f520d..789964e9277e555 100644 Binary files a/regression-test/data/schema_change_p0/test_rename_rollup.out and b/regression-test/data/schema_change_p0/test_rename_rollup.out differ