From ebf26f6596d3ea331618b479d637a5dd154002b9 Mon Sep 17 00:00:00 2001 From: morrySnow Date: Tue, 30 Jul 2024 15:24:54 +0800 Subject: [PATCH] [fix](compatibility) type toSql should return lowercase string (#38012) pick from master #38012 --- .../apache/doris/catalog/AggStateType.java | 4 +- .../org/apache/doris/catalog/ArrayType.java | 10 +- .../org/apache/doris/catalog/MapType.java | 6 +- .../org/apache/doris/catalog/ScalarType.java | 80 +++--- .../org/apache/doris/catalog/StructField.java | 4 +- .../org/apache/doris/catalog/StructType.java | 6 +- .../apache/doris/analysis/DescribeStmt.java | 8 +- .../java/org/apache/doris/catalog/Column.java | 4 +- .../common/proc/IndexSchemaProcNode.java | 6 +- .../doris/analysis/AddColumnsClauseTest.java | 12 +- .../apache/doris/analysis/ColumnDefTest.java | 10 +- .../analysis/CreateTableAsSelectStmtTest.java | 82 +++--- .../doris/analysis/CreateTableStmtTest.java | 26 +- .../apache/doris/analysis/MapLiteralTest.java | 12 +- .../apache/doris/analysis/SelectStmtTest.java | 4 +- .../analysis/ShowCreateFunctionTest.java | 4 +- .../analysis/ShowCreateTableStmtTest.java | 2 +- .../doris/catalog/ColocateTableTest.java | 2 +- .../apache/doris/catalog/ColumnTypeTest.java | 12 +- .../doris/catalog/CreateFunctionTest.java | 20 +- .../external/elasticsearch/EsUtilTest.java | 18 +- .../apache/doris/planner/QueryPlanTest.java | 10 +- .../planner/RuntimeFilterGeneratorTest.java | 80 +++--- .../doris/planner/TableFunctionPlanTest.java | 38 +-- .../ExtractCommonFactorsRuleFunctionTest.java | 10 +- .../doris/rewrite/InferFiltersRuleTest.java | 4 +- .../doris/statistics/HistogramTest.java | 4 +- .../test_create_table_with_bloom_filter.out | 104 +++---- .../correctness/test_view_varchar_length.out | 2 +- .../aggregate/test_aggregate_table.out | 64 ++--- .../duplicate/test_duplicate_table.out | 24 +- .../test_duplicate_table_without_keys.out | 36 +-- .../unique/test_unique_table.out | 22 +- .../unique/test_unique_table_like.out | 28 +- .../unique/test_unique_table_new_sequence.out | 16 +- .../datatype_p0/bitmap/test_bitmap_int.out | Bin 350 -> 350 bytes .../decimalv3/test_show_decimalv3.out | 16 +- .../get_assignment_compatible_type.out | 2 +- .../data/ddl_p0/test_create_table_like.out | 28 +- .../hive/test_hive_basic_type.out | 13 +- .../hive/test_hive_struct_add_column.out | 10 +- .../jdbc/test_doris_jdbc_catalog.out | 62 ++--- .../jdbc/test_mysql_jdbc_catalog.out | 65 ++--- .../jdbc/test_oracle_jdbc_catalog.out | 66 ++--- .../jdbc/test_pg_jdbc_catalog.out | 50 ++-- .../jdbc/test_sqlserver_jdbc_catalog.out | 64 ++--- .../external_table_p0/tvf/test_hdfs_tvf.out | 40 +-- .../tvf/test_hdfs_tvf_error_uri.out | 2 +- .../external_table_p0/tvf/test_tvf_avro.out | 52 ++-- .../data/index_p0/test_bitmap_index.out | 118 ++++---- .../test_decimal_bitmap_index_multi_page.out | 2 +- .../inverted_index_p0/test_bitmap_index.out | 70 ++--- .../inverted_index_p0/test_inverted_index.out | 94 +++---- .../data/load_p0/tvf/test_tvf_empty_file.out | 8 +- .../data/load_p0/tvf/test_tvf_error_url.out | 4 +- .../mv_p0/varchar_length/varchar_length.out | 8 +- .../data/nereids_syntax_p0/rollup/agg.out | 18 +- .../nereids_syntax_p0/rollup/agg_date.out | 34 +-- .../data/nereids_syntax_p0/rollup/hll/hll.out | 14 +- .../hll_with_light_sc/hll_with_light_sc.out | 14 +- .../system/test_metadata_name_ids.out | 12 +- .../query_p0/system/test_query_sys_tables.out | 216 +++++++-------- .../rollup/test_materialized_view_hll.out | 14 +- ...st_materialized_view_hll_with_light_sc.out | 14 +- .../data/rollup_p0/test_materialized_view.out | 48 ++-- .../data/rollup_p0/test_rollup_agg.out | 18 +- .../data/rollup_p0/test_rollup_agg_date.out | 34 +-- .../schema_change_modify_mv_column_type2.out | 88 +++--- ...chema_change_modify_mv_column_type_agg.out | 88 +++--- .../test_alter_table_column.out | 26 +- .../schema_change_p0/test_rename_column.out | Bin 4171 -> 4171 bytes .../schema_change_p0/test_rename_rollup.out | Bin 1364 -> 1364 bytes .../schema_change_p0/test_schema_change.out | 10 +- .../test_uniq_delete_sign_schema_change.out | 24 +- .../test_show_create_table_and_views.out | 8 +- .../test_unsigned_int_compatibility.out | 15 +- .../data/update/test_update_mow.out | 8 +- .../data/update/test_update_unique.out | 8 +- ...reate_view_star_except_and_cast_to_sql.out | 2 +- .../correctness_p0/test_cast_decimal.groovy | 6 +- .../test_current_timestamp.groovy | 2 +- ...ed_types_insert_into_with_agg_table.groovy | 130 ++++----- ...ed_types_insert_into_with_dup_table.groovy | 130 ++++----- ...types_insert_into_with_unique_table.groovy | 260 +++++++++--------- .../delete_p0/test_array_column_delete.groovy | 2 +- .../delete_p0/test_map_column_delete.groovy | 2 +- .../test_struct_column_delete.groovy | 2 +- .../nereids_p0/datatype/test_cast.groovy | 6 +- .../test_simplify_arithmetic.groovy | 2 +- .../suites/nereids_syntax_p0/explain.groovy | 2 +- .../test_simplify_comparison.groovy | 22 +- .../test_partition_table_err_msg.groovy | 2 +- .../test_materialized_view_array.groovy | 2 +- .../test_materialized_view_struct.groovy | 2 +- .../suites/statistics/test_analyze_mv.groovy | 18 +- 95 files changed, 1428 insertions(+), 1423 deletions(-) diff --git a/fe/fe-common/src/main/java/org/apache/doris/catalog/AggStateType.java b/fe/fe-common/src/main/java/org/apache/doris/catalog/AggStateType.java index 3d1b6ac64f5bf4..c6d61158e0c848 100644 --- a/fe/fe-common/src/main/java/org/apache/doris/catalog/AggStateType.java +++ b/fe/fe-common/src/main/java/org/apache/doris/catalog/AggStateType.java @@ -73,14 +73,14 @@ public boolean getResultIsNullable() { @Override public String toSql(int depth) { StringBuilder stringBuilder = new StringBuilder(); - stringBuilder.append("AGG_STATE("); + stringBuilder.append("agg_state("); for (int i = 0; i < subTypes.size(); i++) { if (i > 0) { stringBuilder.append(", "); } stringBuilder.append(subTypes.get(i).toSql()); if (subTypeNullables.get(i)) { - stringBuilder.append(" NULL"); + stringBuilder.append(" null"); } } stringBuilder.append(")"); diff --git a/fe/fe-common/src/main/java/org/apache/doris/catalog/ArrayType.java b/fe/fe-common/src/main/java/org/apache/doris/catalog/ArrayType.java index c71684dfdb53a3..ff0e1241f8d62c 100644 --- a/fe/fe-common/src/main/java/org/apache/doris/catalog/ArrayType.java +++ b/fe/fe-common/src/main/java/org/apache/doris/catalog/ArrayType.java @@ -130,11 +130,13 @@ public static ArrayType create(Type type, boolean containsNull) { @Override public String toSql(int depth) { + StringBuilder typeStr = new StringBuilder(); + typeStr.append("array<").append(itemType.toSql(depth + 1)); if (!containsNull) { - return "ARRAY<" + itemType.toSql(depth + 1) + " NOT NULL>"; - } else { - return "ARRAY<" + itemType.toSql(depth + 1) + ">"; + typeStr.append(" not null"); } + typeStr.append(">"); + return typeStr.toString(); } @Override @@ -211,7 +213,7 @@ public boolean supportSubType(Type subType) { @Override public String toString() { - return String.format("ARRAY<%s>", itemType.toString()); + return String.format("array<%s>", itemType.toString()); } @Override diff --git a/fe/fe-common/src/main/java/org/apache/doris/catalog/MapType.java b/fe/fe-common/src/main/java/org/apache/doris/catalog/MapType.java index fbe7deb1cdeb65..612f7802531743 100644 --- a/fe/fe-common/src/main/java/org/apache/doris/catalog/MapType.java +++ b/fe/fe-common/src/main/java/org/apache/doris/catalog/MapType.java @@ -106,9 +106,9 @@ public boolean equals(Object other) { @Override public String toSql(int depth) { if (depth >= MAX_NESTING_DEPTH) { - return "MAP<...>"; + return "map<...>"; } - return String.format("MAP<%s,%s>", + return String.format("map<%s,%s>", keyType.toSql(depth + 1), valueType.toSql(depth + 1)); } @@ -176,7 +176,7 @@ public Type specializeTemplateType(Type specificType, Map speciali @Override public String toString() { - return String.format("MAP<%s,%s>", + return String.format("map<%s,%s>", keyType.toString(), valueType.toString()); } diff --git a/fe/fe-common/src/main/java/org/apache/doris/catalog/ScalarType.java b/fe/fe-common/src/main/java/org/apache/doris/catalog/ScalarType.java index 6f684471e56c6f..c61abab58a74f5 100644 --- a/fe/fe-common/src/main/java/org/apache/doris/catalog/ScalarType.java +++ b/fe/fe-common/src/main/java/org/apache/doris/catalog/ScalarType.java @@ -578,34 +578,34 @@ public static ScalarType createHllType() { public String toString() { if (type == PrimitiveType.CHAR) { if (isWildcardChar()) { - return "CHARACTER(" + MAX_CHAR_LENGTH + ")"; + return "character(" + MAX_CHAR_LENGTH + ")"; } - return "CHAR(" + len + ")"; + return "char(" + len + ")"; } else if (type == PrimitiveType.DECIMALV2) { if (isWildcardDecimal()) { - return "DECIMAL(*, *)"; + return "decimal(*,*)"; } - return "DECIMAL(" + precision + ", " + scale + ")"; + return "decimal(" + precision + "," + scale + ")"; } else if (type.isDecimalV3Type()) { if (isWildcardDecimal()) { - return "DECIMALV3(*, *)"; + return "decimalv3(*,*)"; } - return "DECIMALV3(" + precision + ", " + scale + ")"; + return "decimalv3(" + precision + "," + scale + ")"; } else if (type == PrimitiveType.DATETIMEV2) { - return "DATETIMEV2(" + scale + ")"; + return "datetimev2(" + scale + ")"; } else if (type == PrimitiveType.TIMEV2) { - return "TIMEV2(" + scale + ")"; + return "timev2(" + scale + ")"; } else if (type == PrimitiveType.VARCHAR) { if (isWildcardVarchar()) { - return "VARCHAR(" + MAX_VARCHAR_LENGTH + ")"; + return "varchar(" + MAX_VARCHAR_LENGTH + ")"; } - return "VARCHAR(" + len + ")"; + return "varchar(" + len + ")"; } else if (type == PrimitiveType.STRING) { - return "TEXT"; + return "text"; } else if (type == PrimitiveType.JSONB) { - return "JSON"; + return "json"; } - return type.toString(); + return type.toString().toLowerCase(); } @Override @@ -614,68 +614,68 @@ public String toSql(int depth) { switch (type) { case CHAR: if (isWildcardChar()) { - stringBuilder.append("CHARACTER").append("(").append(MAX_CHAR_LENGTH).append(")"); + stringBuilder.append("character").append("(").append(MAX_CHAR_LENGTH).append(")"); } else if (Strings.isNullOrEmpty(lenStr)) { - stringBuilder.append("CHAR").append("(").append(len).append(")"); + stringBuilder.append("char").append("(").append(len).append(")"); } else { - stringBuilder.append("CHAR").append("(`").append(lenStr).append("`)"); + stringBuilder.append("char").append("(`").append(lenStr).append("`)"); } break; case VARCHAR: if (isWildcardVarchar()) { - return "VARCHAR(" + MAX_VARCHAR_LENGTH + ")"; + return "varchar(" + MAX_VARCHAR_LENGTH + ")"; } else if (Strings.isNullOrEmpty(lenStr)) { - stringBuilder.append("VARCHAR").append("(").append(len).append(")"); + stringBuilder.append("varchar").append("(").append(len).append(")"); } else { - stringBuilder.append("VARCHAR").append("(`").append(lenStr).append("`)"); + stringBuilder.append("varchar").append("(`").append(lenStr).append("`)"); } break; case DECIMALV2: if (Strings.isNullOrEmpty(precisionStr)) { - stringBuilder.append("DECIMAL").append("(").append(precision) - .append(", ").append(scale).append(")"); + stringBuilder.append("decimal").append("(").append(precision) + .append(",").append(scale).append(")"); } else if (!Strings.isNullOrEmpty(precisionStr) && !Strings.isNullOrEmpty(scaleStr)) { - stringBuilder.append("DECIMAL").append("(`").append(precisionStr) - .append("`, `").append(scaleStr).append("`)"); + stringBuilder.append("decimal").append("(`").append(precisionStr) + .append("`,`").append(scaleStr).append("`)"); } else { - stringBuilder.append("DECIMAL").append("(`").append(precisionStr).append("`)"); + stringBuilder.append("decimal").append("(`").append(precisionStr).append("`)"); } break; case DECIMAL32: case DECIMAL64: case DECIMAL128: - String typeName = "DECIMALV3"; + String typeName = "decimalv3"; if (Strings.isNullOrEmpty(precisionStr)) { stringBuilder.append(typeName).append("(").append(precision) - .append(", ").append(scale).append(")"); + .append(",").append(scale).append(")"); } else if (!Strings.isNullOrEmpty(precisionStr) && !Strings.isNullOrEmpty(scaleStr)) { stringBuilder.append(typeName).append("(`").append(precisionStr) - .append("`, `").append(scaleStr).append("`)"); + .append("`,`").append(scaleStr).append("`)"); } else { stringBuilder.append(typeName).append("(`").append(precisionStr).append("`)"); } break; case DATETIMEV2: - stringBuilder.append("DATETIMEV2").append("(").append(scale).append(")"); + stringBuilder.append("datetimev2").append("(").append(scale).append(")"); break; case TIME: - stringBuilder.append("TIME"); + stringBuilder.append("time"); break; case TIMEV2: - stringBuilder.append("TIME").append("(").append(scale).append(")"); + stringBuilder.append("time").append("(").append(scale).append(")"); break; case BOOLEAN: - return "BOOLEAN"; + return "boolean"; case TINYINT: - return "TINYINT"; + return "tinyint"; case SMALLINT: - return "SMALLINT"; + return "smallint"; case INT: - return "INT"; + return "int"; case BIGINT: - return "BIGINT"; + return "bigint"; case LARGEINT: - return "LARGEINT"; + return "largeint"; case FLOAT: case DOUBLE: case DATE: @@ -688,16 +688,16 @@ public String toSql(int depth) { case LAMBDA_FUNCTION: case ARRAY: case NULL_TYPE: - stringBuilder.append(type); + stringBuilder.append(type.toString().toLowerCase()); break; case STRING: - stringBuilder.append("TEXT"); + stringBuilder.append("text"); break; case JSONB: - stringBuilder.append("JSON"); + stringBuilder.append("json"); break; case AGG_STATE: - stringBuilder.append("AGG_STATE(UNKNOWN)"); + stringBuilder.append("agg_state(unknown)"); break; default: stringBuilder.append("unknown type: ").append(type); diff --git a/fe/fe-common/src/main/java/org/apache/doris/catalog/StructField.java b/fe/fe-common/src/main/java/org/apache/doris/catalog/StructField.java index 5a2b3f221ea244..9e685e120744b7 100644 --- a/fe/fe-common/src/main/java/org/apache/doris/catalog/StructField.java +++ b/fe/fe-common/src/main/java/org/apache/doris/catalog/StructField.java @@ -89,7 +89,7 @@ public boolean getContainsNull() { public String toSql(int depth) { String typeSql; if (depth < Type.MAX_NESTING_DEPTH) { - typeSql = !containsNull ? "not_null(" + type.toSql(depth) + ")" : type.toSql(depth); + typeSql = type.toSql(depth + 1) + (!containsNull ? " not null" : ""); } else { typeSql = "..."; } @@ -98,7 +98,7 @@ public String toSql(int depth) { sb.append(":").append(typeSql); } if (StringUtils.isNotBlank(comment)) { - sb.append(String.format(" COMMENT '%s'", comment)); + sb.append(String.format(" comment '%s'", comment)); } return sb.toString(); } diff --git a/fe/fe-common/src/main/java/org/apache/doris/catalog/StructType.java b/fe/fe-common/src/main/java/org/apache/doris/catalog/StructType.java index 1d6be19d28efbc..fa8a43dccb1d9d 100644 --- a/fe/fe-common/src/main/java/org/apache/doris/catalog/StructType.java +++ b/fe/fe-common/src/main/java/org/apache/doris/catalog/StructType.java @@ -79,13 +79,13 @@ public StructType() { @Override public String toSql(int depth) { if (depth >= MAX_NESTING_DEPTH) { - return "STRUCT<...>"; + return "struct<...>"; } ArrayList fieldsSql = Lists.newArrayList(); for (StructField f : fields) { fieldsSql.add(f.toSql(depth + 1)); } - return String.format("STRUCT<%s>", Joiner.on(",").join(fieldsSql)); + return String.format("struct<%s>", Joiner.on(",").join(fieldsSql)); } @Override @@ -331,7 +331,7 @@ public String toString() { for (StructField f : fields) { fieldsSql.add(f.toString()); } - return String.format("STRUCT<%s>", Joiner.on(",").join(fieldsSql)); + return String.format("struct<%s>", Joiner.on(",").join(fieldsSql)); } @Override 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 f632c00f9c38a1..9602aefbdc9f60 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 @@ -132,21 +132,21 @@ public void analyze(Analyzer analyzer) throws UserException { "NONE" ); 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(1, typeStr.toString()); } else if (column.getOriginType().isDateV2()) { - row.set(1, "DATE"); + row.set(1, "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(1, typeStr.toString()); diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/Column.java b/fe/fe-core/src/main/java/org/apache/doris/catalog/Column.java index 04de9348ef9b9f..69d7e238af027e 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/catalog/Column.java +++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/Column.java @@ -735,13 +735,13 @@ public String toSql(boolean isUniqueTable, boolean isCompatible) { } else if (type.isDateV2()) { sb.append("date"); } else if (type.isDecimalV3()) { - sb.append("DECIMAL"); + sb.append("decimal"); ScalarType sType = (ScalarType) type; int scale = sType.getScalarScale(); int precision = sType.getScalarPrecision(); // not default if (!sType.isDefaultDecimal()) { - sb.append("(").append(precision).append(", ").append(scale) + sb.append("(").append(precision).append(",").append(scale) .append(")"); } } else { diff --git a/fe/fe-core/src/main/java/org/apache/doris/common/proc/IndexSchemaProcNode.java b/fe/fe-core/src/main/java/org/apache/doris/common/proc/IndexSchemaProcNode.java index 47da7a9d53b7a1..2166ab90eb1ebb 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/common/proc/IndexSchemaProcNode.java +++ b/fe/fe-core/src/main/java/org/apache/doris/common/proc/IndexSchemaProcNode.java @@ -79,17 +79,17 @@ public ProcResult fetchResult() throws AnalysisException { extraStr); if (column.getOriginType().isDateV2()) { - rowList.set(1, "DATE"); + rowList.set(1, "date"); } 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(")"); } rowList.set(1, typeStr.toString()); } 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(); diff --git a/fe/fe-core/src/test/java/org/apache/doris/analysis/AddColumnsClauseTest.java b/fe/fe-core/src/test/java/org/apache/doris/analysis/AddColumnsClauseTest.java index 06a4fe601381f6..194dbd899badc5 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/analysis/AddColumnsClauseTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/analysis/AddColumnsClauseTest.java @@ -48,21 +48,21 @@ public void testNormal() throws AnalysisException { columns.add(definition); AddColumnsClause clause = new AddColumnsClause(columns, null, null); clause.analyze(analyzer); - Assert.assertEquals("ADD COLUMN (`col1` INT NOT NULL DEFAULT \"0\" COMMENT \"\", " - + "`col2` INT NOT NULL DEFAULT \"0\" COMMENT \"\")", clause.toString()); + Assert.assertEquals("ADD COLUMN (`col1` int NOT NULL DEFAULT \"0\" COMMENT \"\", " + + "`col2` int NOT NULL DEFAULT \"0\" COMMENT \"\")", clause.toString()); clause = new AddColumnsClause(columns, "", null); clause.analyze(analyzer); - Assert.assertEquals("ADD COLUMN (`col1` INT NOT NULL DEFAULT \"0\" COMMENT \"\", " - + "`col2` INT NOT NULL DEFAULT \"0\" COMMENT \"\")", + Assert.assertEquals("ADD COLUMN (`col1` int NOT NULL DEFAULT \"0\" COMMENT \"\", " + + "`col2` int NOT NULL DEFAULT \"0\" COMMENT \"\")", clause.toString()); Assert.assertNull(clause.getRollupName()); clause = new AddColumnsClause(columns, "testTable", null); clause.analyze(analyzer); - Assert.assertEquals("ADD COLUMN (`col1` INT NOT NULL DEFAULT \"0\" COMMENT \"\", " - + "`col2` INT NOT NULL DEFAULT \"0\" COMMENT \"\") IN `testTable`", + Assert.assertEquals("ADD COLUMN (`col1` int NOT NULL DEFAULT \"0\" COMMENT \"\", " + + "`col2` int NOT NULL DEFAULT \"0\" COMMENT \"\") IN `testTable`", clause.toString()); Assert.assertNull(clause.getProperties()); Assert.assertEquals("testTable", clause.getRollupName()); diff --git a/fe/fe-core/src/test/java/org/apache/doris/analysis/ColumnDefTest.java b/fe/fe-core/src/test/java/org/apache/doris/analysis/ColumnDefTest.java index fad5787a37bc79..fc9bd4a7ac6c14 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/analysis/ColumnDefTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/analysis/ColumnDefTest.java @@ -61,7 +61,7 @@ public void testNormal() throws AnalysisException { ColumnDef column = new ColumnDef("col", intCol); column.analyze(true); - Assert.assertEquals("`col` INT NOT NULL COMMENT \"\"", column.toString()); + Assert.assertEquals("`col` int NOT NULL COMMENT \"\"", column.toString()); Assert.assertEquals("col", column.getName()); Assert.assertEquals(PrimitiveType.INT, column.getType().getPrimitiveType()); Assert.assertNull(column.getAggregateType()); @@ -72,14 +72,14 @@ public void testNormal() throws AnalysisException { column.analyze(true); Assert.assertNull(column.getAggregateType()); Assert.assertEquals("10", column.getDefaultValue()); - Assert.assertEquals("`col` INT NOT NULL DEFAULT \"10\" COMMENT \"\"", column.toSql()); + Assert.assertEquals("`col` int NOT NULL DEFAULT \"10\" COMMENT \"\"", column.toSql()); // agg column = new ColumnDef("col", floatCol, false, AggregateType.SUM, false, new DefaultValue(true, "10"), ""); column.analyze(true); Assert.assertEquals("10", column.getDefaultValue()); Assert.assertEquals(AggregateType.SUM, column.getAggregateType()); - Assert.assertEquals("`col` FLOAT SUM NOT NULL DEFAULT \"10\" COMMENT \"\"", column.toSql()); + Assert.assertEquals("`col` float SUM NOT NULL DEFAULT \"10\" COMMENT \"\"", column.toSql()); } @Test @@ -89,14 +89,14 @@ public void testReplaceIfNotNull() throws AnalysisException { ColumnDef column = new ColumnDef("col", intCol, false, AggregateType.REPLACE_IF_NOT_NULL, false, DefaultValue.NOT_SET, ""); column.analyze(true); Assert.assertEquals(AggregateType.REPLACE_IF_NOT_NULL, column.getAggregateType()); - Assert.assertEquals("`col` INT REPLACE_IF_NOT_NULL NULL DEFAULT \"null\" COMMENT \"\"", column.toSql()); + Assert.assertEquals("`col` int REPLACE_IF_NOT_NULL NULL DEFAULT \"null\" COMMENT \"\"", column.toSql()); } // CHECKSTYLE IGNORE THIS LINE { // CHECKSTYLE IGNORE THIS LINE // not allow null ColumnDef column = new ColumnDef("col", intCol, false, AggregateType.REPLACE_IF_NOT_NULL, false, new DefaultValue(true, "10"), ""); column.analyze(true); Assert.assertEquals(AggregateType.REPLACE_IF_NOT_NULL, column.getAggregateType()); - Assert.assertEquals("`col` INT REPLACE_IF_NOT_NULL NULL DEFAULT \"10\" COMMENT \"\"", column.toSql()); + Assert.assertEquals("`col` int REPLACE_IF_NOT_NULL NULL DEFAULT \"10\" COMMENT \"\"", column.toSql()); } // CHECKSTYLE IGNORE THIS LINE } diff --git a/fe/fe-core/src/test/java/org/apache/doris/analysis/CreateTableAsSelectStmtTest.java b/fe/fe-core/src/test/java/org/apache/doris/analysis/CreateTableAsSelectStmtTest.java index 7ce0fdd64f3be1..b0929ba4d499cd 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/analysis/CreateTableAsSelectStmtTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/analysis/CreateTableAsSelectStmtTest.java @@ -83,9 +83,9 @@ public void testDecimal() throws Exception { + "as select * from `test`.`decimal_table`"; createTableAsSelect(selectFromDecimal); Assertions.assertEquals("CREATE TABLE `select_decimal_table` (\n" - + " `userId` VARCHAR(255) NOT NULL,\n" + + " `userId` varchar(255) NOT NULL,\n" + " `amount_decimal` " - + "DECIMAL" + "(10, 2) NOT NULL\n" + + "decimal" + "(10,2) NOT NULL\n" + ") ENGINE=OLAP\n" + "DUPLICATE KEY(`userId`)\n" + "DISTRIBUTED BY HASH(`userId`) BUCKETS 10\n" @@ -107,7 +107,7 @@ public void testDecimal() throws Exception { if (Config.enable_decimal_conversion) { Assertions.assertEquals( "CREATE TABLE `select_decimal_table_1` (\n" - + " `_col0` DECIMAL(38, 2) NULL\n" + + " `_col0` decimal(38,2) NULL\n" + ") ENGINE=OLAP\n" + "DUPLICATE KEY(`_col0`)\n" + "DISTRIBUTED BY HASH(`_col0`) BUCKETS 10\n" @@ -125,7 +125,7 @@ public void testDecimal() throws Exception { } else { Assertions.assertEquals( "CREATE TABLE `select_decimal_table_1` (\n" - + " `_col0` decimal(27, 9) NULL\n" + + " `_col0` decimal(27,9) NULL\n" + ") ENGINE=OLAP\n" + "DUPLICATE KEY(`_col0`)\n" + "DISTRIBUTED BY HASH(`_col0`) BUCKETS 10\n" @@ -160,8 +160,8 @@ public void testVarchar() throws Exception { createTableAsSelect(selectFromVarchar); ShowResultSet showResultSet = showCreateTableByName("select_varchar"); Assertions.assertEquals("CREATE TABLE `select_varchar` (\n" - + " `userId` VARCHAR(255) NOT NULL,\n" - + " `username` VARCHAR(255) NOT NULL\n" + + " `userId` varchar(255) NOT NULL,\n" + + " `username` varchar(255) NOT NULL\n" + ") ENGINE=OLAP\n" + "DUPLICATE KEY(`userId`)\n" + "DISTRIBUTED BY HASH(`userId`) BUCKETS 10\n" @@ -186,7 +186,7 @@ public void testFunction() throws Exception { ShowResultSet showResultSet1 = showCreateTableByName("select_function_1"); Assertions.assertEquals( "CREATE TABLE `select_function_1` (\n" - + " `_col0` BIGINT NULL\n" + + " `_col0` bigint NULL\n" + ") ENGINE=OLAP\n" + "DUPLICATE KEY(`_col0`)\n" + "DISTRIBUTED BY HASH(`_col0`) BUCKETS 10\n" @@ -209,11 +209,11 @@ public void testFunction() throws Exception { ShowResultSet showResultSet2 = showCreateTableByName("select_function_2"); Assertions.assertEquals( "CREATE TABLE `select_function_2` (\n" - + " `_col0` BIGINT NULL,\n" - + " `_col1` BIGINT NULL,\n" - + " `_col2` BIGINT NULL,\n" - + " `_col3` BIGINT NULL,\n" - + " `_col4` BIGINT NULL\n" + + " `_col0` bigint NULL,\n" + + " `_col1` bigint NULL,\n" + + " `_col2` bigint NULL,\n" + + " `_col3` bigint NULL,\n" + + " `_col4` bigint NULL\n" + ") ENGINE=OLAP\n" + "DUPLICATE KEY(`_col0`, `_col1`, `_col2`)\n" + "DISTRIBUTED BY HASH(`_col0`) BUCKETS 10\n" @@ -237,7 +237,7 @@ public void testAlias() throws Exception { createTableAsSelect(selectAlias1); ShowResultSet showResultSet1 = showCreateTableByName("select_alias_1"); Assertions.assertEquals("CREATE TABLE `select_alias_1` (\n" - + " `amount` BIGINT NULL\n" + + " `amount` bigint NULL\n" + ") ENGINE=OLAP\n" + "DUPLICATE KEY(`amount`)\n" + "DISTRIBUTED BY HASH(`amount`) BUCKETS 10\n" @@ -256,8 +256,8 @@ public void testAlias() throws Exception { createTableAsSelect(selectAlias2); ShowResultSet showResultSet2 = showCreateTableByName("select_alias_2"); Assertions.assertEquals("CREATE TABLE `select_alias_2` (\n" - + " `alias_name` VARCHAR(255) NOT NULL,\n" - + " `username` VARCHAR(255) NOT NULL\n" + + " `alias_name` varchar(255) NOT NULL,\n" + + " `username` varchar(255) NOT NULL\n" + ") ENGINE=OLAP\n" + "DUPLICATE KEY(`alias_name`)\n" + "DISTRIBUTED BY HASH(`alias_name`) BUCKETS 10\n" @@ -282,9 +282,9 @@ public void testJoin() throws Exception { createTableAsSelect(selectFromJoin); ShowResultSet showResultSet = showCreateTableByName("select_join"); Assertions.assertEquals("CREATE TABLE `select_join` (\n" - + " `userId` VARCHAR(255) NOT NULL,\n" - + " `username` VARCHAR(255) NOT NULL,\n" - + " `status` INT NOT NULL\n" + + " `userId` varchar(255) NOT NULL,\n" + + " `username` varchar(255) NOT NULL,\n" + + " `status` int NOT NULL\n" + ") ENGINE=OLAP\n" + "DUPLICATE KEY(`userId`)\n" + "DISTRIBUTED BY HASH(`userId`) BUCKETS 10\n" @@ -305,10 +305,10 @@ public void testJoin() throws Exception { createTableAsSelect(selectFromJoin1); ShowResultSet showResultSet1 = showCreateTableByName("select_join1"); Assertions.assertEquals("CREATE TABLE `select_join1` (\n" - + " `userId1` VARCHAR(255) NOT NULL,\n" - + " `userId2` VARCHAR(255) NOT NULL,\n" - + " `username` VARCHAR(255) NOT NULL,\n" - + " `status` INT NOT NULL\n" + + " `userId1` varchar(255) NOT NULL,\n" + + " `userId2` varchar(255) NOT NULL,\n" + + " `username` varchar(255) NOT NULL,\n" + + " `status` int NOT NULL\n" + ") ENGINE=OLAP\n" + "DUPLICATE KEY(`userId1`)\n" + "DISTRIBUTED BY HASH(`userId1`) BUCKETS 10\n" @@ -334,9 +334,9 @@ public void testName() throws Exception { createTableAsSelect(selectFromName); ShowResultSet showResultSet = showCreateTableByName("select_name"); Assertions.assertEquals("CREATE TABLE `select_name` (\n" - + " `user` VARCHAR(255) NOT NULL,\n" - + " `testname` VARCHAR(255) NOT NULL,\n" - + " `userstatus` INT NOT NULL\n" + + " `user` varchar(255) NOT NULL,\n" + + " `testname` varchar(255) NOT NULL,\n" + + " `userstatus` int NOT NULL\n" + ") ENGINE=OLAP\n" + "DUPLICATE KEY(`user`)\n" + "DISTRIBUTED BY HASH(`user`) BUCKETS 10\n" @@ -361,7 +361,7 @@ public void testUnion() throws Exception { ShowResultSet showResultSet = showCreateTableByName("select_union"); Assertions.assertEquals( "CREATE TABLE `select_union` (\n" - + " `userId` VARCHAR(255) NULL\n" + + " `userId` varchar(255) NULL\n" + ") ENGINE=OLAP\n" + "DUPLICATE KEY(`userId`)\n" + "DISTRIBUTED BY HASH(`userId`) BUCKETS 10\n" @@ -385,7 +385,7 @@ public void testCte() throws Exception { ShowResultSet showResultSet = showCreateTableByName("select_cte"); Assertions.assertEquals( "CREATE TABLE `select_cte` (\n" - + " `userId` VARCHAR(255) NOT NULL\n" + + " `userId` varchar(255) NOT NULL\n" + ") ENGINE=OLAP\n" + "DUPLICATE KEY(`userId`)\n" + "DISTRIBUTED BY HASH(`userId`) BUCKETS 10\n" @@ -405,7 +405,7 @@ public void testCte() throws Exception { createTableAsSelect(selectFromCteAndUnion); ShowResultSet showResultSet1 = showCreateTableByName("select_cte_union"); Assertions.assertEquals("CREATE TABLE `select_cte_union` (\n" - + " `id` TINYINT NULL\n" + + " `id` tinyint NULL\n" + ") ENGINE=OLAP\n" + "DUPLICATE KEY(`id`)\n" + "DISTRIBUTED BY HASH(`id`) BUCKETS 10\n" @@ -429,8 +429,8 @@ public void testPartition() throws Exception { createTableAsSelect(selectFromPartition); ShowResultSet showResultSet = showCreateTableByName("selectPartition"); Assertions.assertEquals("CREATE TABLE `selectPartition` (\n" - + " `userId` VARCHAR(255) NOT NULL,\n" - + " `username` VARCHAR(255) NOT NULL\n" + + " `userId` varchar(255) NOT NULL,\n" + + " `username` varchar(255) NOT NULL\n" + ") ENGINE=OLAP\n" + "DUPLICATE KEY(`userId`)\n" + "PARTITION BY LIST(`userId`)\n" @@ -456,7 +456,7 @@ public void testDefaultTimestamp() throws Exception { createTableAsSelect(createSql); ShowResultSet showResultSet = showCreateTableByName("test_default_timestamp"); Assertions.assertEquals("CREATE TABLE `test_default_timestamp` (\n" - + " `userId` VARCHAR(255) NOT NULL,\n" + + " `userId` varchar(255) NOT NULL,\n" + " `date` datetime" + " NULL DEFAULT CURRENT_TIMESTAMP\n" + ") ENGINE=OLAP\n" @@ -483,7 +483,7 @@ public void testAggValue() throws Exception { ShowResultSet showResultSet = showCreateTableByName("test_agg_value"); Assertions.assertEquals( "CREATE TABLE `test_agg_value` (\n" - + " `username` VARCHAR(255) NOT NULL\n" + + " `username` varchar(255) NOT NULL\n" + ") ENGINE=OLAP\n" + "DUPLICATE KEY(`username`)\n" + "DISTRIBUTED BY HASH(`username`) BUCKETS 10\n" @@ -508,8 +508,8 @@ public void testUseKeyType() throws Exception { ShowResultSet showResultSet = showCreateTableByName("test_use_key_type"); Assertions.assertEquals( "CREATE TABLE `test_use_key_type` (\n" - + " `userId` VARCHAR(255) NOT NULL,\n" - + " `username` VARCHAR(255) NOT NULL\n" + + " `userId` varchar(255) NOT NULL,\n" + + " `username` varchar(255) NOT NULL\n" + ") ENGINE=OLAP\n" + "UNIQUE KEY(`userId`)\n" + "DISTRIBUTED BY HASH(`userId`) BUCKETS 10\n" @@ -558,8 +558,8 @@ public void testQuerySchema() throws Exception { createStmts.add(createTableStmts.get(0)); if (tbl.getName().equals("qs1")) { Assert.assertEquals("CREATE TABLE `qs1` (\n" - + " `k1` INT NULL,\n" - + " `k2` INT NULL\n" + + " `k1` int NULL,\n" + + " `k2` int NULL\n" + ") ENGINE=OLAP\n" + "DUPLICATE KEY(`k1`, `k2`)\n" + "DISTRIBUTED BY HASH(`k1`) BUCKETS 1\n" @@ -576,8 +576,8 @@ public void testQuerySchema() throws Exception { createTableStmts.get(0)); } else { Assert.assertEquals("CREATE TABLE `qs2` (\n" - + " `k1` INT NULL,\n" - + " `k2` INT NULL\n" + + " `k1` int NULL,\n" + + " `k2` int NULL\n" + ") ENGINE=OLAP\n" + "DUPLICATE KEY(`k1`, `k2`)\n" + "DISTRIBUTED BY HASH(`k1`) BUCKETS 1\n" @@ -607,9 +607,9 @@ public void testVarcharLength() throws Exception { String showStr = showResultSet.getResultRows().get(0).get(1); Assertions.assertEquals( "CREATE TABLE `varchar_len1` (\n" - + " `_col0` VARCHAR(65533) NULL,\n" - + " `_col1` VARCHAR(65533) NULL,\n" - + " `userId` VARCHAR(255) NOT NULL\n" + + " `_col0` varchar(65533) NULL,\n" + + " `_col1` varchar(65533) NULL,\n" + + " `userId` varchar(255) NOT NULL\n" + ") ENGINE=OLAP\n" + "DUPLICATE KEY(`_col0`)\n" + "DISTRIBUTED BY HASH(`_col0`) BUCKETS 10\n" diff --git a/fe/fe-core/src/test/java/org/apache/doris/analysis/CreateTableStmtTest.java b/fe/fe-core/src/test/java/org/apache/doris/analysis/CreateTableStmtTest.java index d856599a3d7b9a..44517670dbd33e 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/analysis/CreateTableStmtTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/analysis/CreateTableStmtTest.java @@ -337,7 +337,7 @@ public void testHllNoAggTab() throws Exception { null, null, ""); expectedEx.expect(AnalysisException.class); expectedEx.expectMessage( - "Aggregate type `col3` HLL NONE NOT NULL COMMENT \"\" is not compatible with primitive type HLL"); + "Aggregate type `col3` hll NONE NOT NULL COMMENT \"\" is not compatible with primitive type hll"); stmt.analyze(analyzer); } @@ -419,8 +419,8 @@ public void testCreateHudiTableWithSchema() throws UserException { stmt.analyze(analyzer); Assert.assertEquals( - "CREATE EXTERNAL TABLE `testCluster:db1`.`table1` (\n" + " `id` INT NOT NULL COMMENT \"\",\n" - + " `name` INT NULL COMMENT \"\"\n" + ") ENGINE = hudi\n" + "CREATE EXTERNAL TABLE `testCluster:db1`.`table1` (\n" + " `id` int NOT NULL COMMENT \"\",\n" + + " `name` int NULL COMMENT \"\"\n" + ") ENGINE = hudi\n" + "PROPERTIES (\"hudi.database\" = \"doris\",\n" + "\"hudi.hive.metastore.uris\" = \"thrift://127.0.0.1:9087\",\n" + "\"hudi.table\" = \"test\")", stmt.toString()); @@ -455,8 +455,8 @@ public void testToSql() { properties, null, "", null); String createTableSql = "CREATE TABLE IF NOT EXISTS `demo`.`testTosql1` (\n" - + " `a` BIGINT NOT NULL COMMENT \"\",\n" - + " `b` INT NOT NULL COMMENT \"\"\n" + + " `a` bigint NOT NULL COMMENT \"\",\n" + + " `b` int NOT NULL COMMENT \"\"\n" + ") ENGINE = olap\n" + "AGGREGATE KEY(`a`)\n" + "PROPERTIES (\"replication_num\" = \"1\")"; @@ -484,14 +484,14 @@ public void testToSql() { tableName, columnDefs, engineName, keysDesc, null, null, properties, null, "", null); createTableSql = "CREATE TABLE `demo`.`testTosql2` (\n" - + " `a` BIGINT NOT NULL COMMENT \"\",\n" - + " `b` INT NOT NULL COMMENT \"\",\n" - + " `c` TEXT NULL COMMENT \"\",\n" - + " `d` DOUBLE NULL COMMENT \"\",\n" - + " `e` DECIMALV3(38, 0) NOT NULL COMMENT \"\",\n" - + " `f` DATE NOT NULL COMMENT \"\",\n" - + " `g` SMALLINT NOT NULL COMMENT \"\",\n" - + " `h` BOOLEAN NOT NULL COMMENT \"\"\n" + + " `a` bigint NOT NULL COMMENT \"\",\n" + + " `b` int NOT NULL COMMENT \"\",\n" + + " `c` text NULL COMMENT \"\",\n" + + " `d` double NULL COMMENT \"\",\n" + + " `e` decimalv3(38,0) NOT NULL COMMENT \"\",\n" + + " `f` date NOT NULL COMMENT \"\",\n" + + " `g` smallint NOT NULL COMMENT \"\",\n" + + " `h` boolean NOT NULL COMMENT \"\"\n" + ") ENGINE = olap\n" + "DUPLICATE KEY(`a`, `d`, `f`)\n" + "PROPERTIES (\"replication_num\" = \"10\")"; diff --git a/fe/fe-core/src/test/java/org/apache/doris/analysis/MapLiteralTest.java b/fe/fe-core/src/test/java/org/apache/doris/analysis/MapLiteralTest.java index 0ab4fbcbcaa997..8640a15ffcc83e 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/analysis/MapLiteralTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/analysis/MapLiteralTest.java @@ -88,7 +88,7 @@ public void testGetStringValueForArray() throws AnalysisException { new MapLiteral(arrayLiteral, floatLiteral); } catch (Exception e) { Assert.assertEquals("errCode = 2, " - + "detailMessage = Invalid key type in Map, not support ARRAY", e.getMessage()); + + "detailMessage = Invalid key type in Map, not support array", e.getMessage()); } MapLiteral mapLiteral11 = new MapLiteral(decimalLiteral1, mapLiteral); @@ -97,7 +97,7 @@ public void testGetStringValueForArray() throws AnalysisException { new MapLiteral(mapLiteral, decimalLiteral1); } catch (Exception e) { Assert.assertEquals("errCode = 2, " - + "detailMessage = Invalid key type in Map, not support MAP", e.getMessage()); + + "detailMessage = Invalid key type in Map, not support map", e.getMessage()); } MapLiteral mapLiteral13 = new MapLiteral(stringLiteral, structLiteral); @@ -107,7 +107,7 @@ public void testGetStringValueForArray() throws AnalysisException { new MapLiteral(structLiteral, stringLiteral); } catch (Exception e) { Assert.assertEquals("errCode = 2, detailMessage = Invalid key type in Map, " - + "not support STRUCT", e.getMessage()); + + "not support struct", e.getMessage()); } } @@ -143,7 +143,7 @@ public void testGetStringInFe() throws AnalysisException { new MapLiteral(arrayLiteral, floatLiteral); } catch (Exception e) { Assert.assertEquals("errCode = 2, " - + "detailMessage = Invalid key type in Map, not support ARRAY", e.getMessage()); + + "detailMessage = Invalid key type in Map, not support array", e.getMessage()); } MapLiteral mapLiteral12 = new MapLiteral(decimalLiteral1, mapLiteral); @@ -152,7 +152,7 @@ public void testGetStringInFe() throws AnalysisException { new MapLiteral(mapLiteral, decimalLiteral1); } catch (Exception e) { Assert.assertEquals("errCode = 2, " - + "detailMessage = Invalid key type in Map, not support MAP", e.getMessage()); + + "detailMessage = Invalid key type in Map, not support map", e.getMessage()); } MapLiteral mapLiteral13 = new MapLiteral(stringLiteral, structLiteral); @@ -163,7 +163,7 @@ public void testGetStringInFe() throws AnalysisException { } catch (Exception e) { Assert.assertEquals("errCode = 2, " + "detailMessage = Invalid key type in Map, " - + "not support STRUCT", e.getMessage()); + + "not support struct", e.getMessage()); } } diff --git a/fe/fe-core/src/test/java/org/apache/doris/analysis/SelectStmtTest.java b/fe/fe-core/src/test/java/org/apache/doris/analysis/SelectStmtTest.java index ddc0dbcfd39154..b2b6585c4864ca 100755 --- a/fe/fe-core/src/test/java/org/apache/doris/analysis/SelectStmtTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/analysis/SelectStmtTest.java @@ -301,8 +301,8 @@ public void testDeduplicateOrs() throws Exception { String commonExpr2 = "`t3`.`k3` = `t1`.`k3`"; String commonExpr3 = "`t1`.`k1` = `t5`.`k1`"; String commonExpr4 = "t5`.`k2` = 'United States'"; - String betweenExpanded1 = "CAST(CAST(`t1`.`k4` AS DECIMALV3(12, 2)) AS INT) >= 100 AND CAST(CAST(`t1`.`k4` AS DECIMALV3(12, 2)) AS INT) <= 150"; - String betweenExpanded2 = "CAST(CAST(`t1`.`k4` AS DECIMALV3(12, 2)) AS INT) >= 50 AND CAST(CAST(`t1`.`k4` AS DECIMALV3(12, 2)) AS INT) <= 100"; + String betweenExpanded1 = "CAST(CAST(`t1`.`k4` AS decimalv3(12,2)) AS int) >= 100 AND CAST(CAST(`t1`.`k4` AS decimalv3(12,2)) AS int) <= 150"; + String betweenExpanded2 = "CAST(CAST(`t1`.`k4` AS decimalv3(12,2)) AS int) >= 50 AND CAST(CAST(`t1`.`k4` AS decimalv3(12,2)) AS int) <= 100"; String betweenExpanded3 = "`t1`.`k4` >= 50 AND `t1`.`k4` <= 250"; String rewrittenSql = stmt.toSql(); diff --git a/fe/fe-core/src/test/java/org/apache/doris/analysis/ShowCreateFunctionTest.java b/fe/fe-core/src/test/java/org/apache/doris/analysis/ShowCreateFunctionTest.java index f89f6fdbf35bcf..04b190b60393b4 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/analysis/ShowCreateFunctionTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/analysis/ShowCreateFunctionTest.java @@ -46,7 +46,7 @@ public void testNormal() throws Exception { String sql = "SHOW CREATE FUNCTION id_masking(bigint)"; ShowResultSet showResultSet = showCreateFunction(sql); String showSql = showResultSet.getResultRows().get(0).get(1); - Assertions.assertTrue(showSql.contains("CREATE ALIAS FUNCTION id_masking(BIGINT) WITH PARAMETER(id)")); + Assertions.assertTrue(showSql.contains("CREATE ALIAS FUNCTION id_masking(bigint) WITH PARAMETER(id)")); } @Test @@ -55,7 +55,7 @@ public void testShowCreateGlobalFunction() throws Exception { ShowResultSet showResultSet = showCreateFunction(sql); String showSql = showResultSet.getResultRows().get(0).get(1); Assertions.assertTrue( - showSql.contains("CREATE GLOBAL ALIAS FUNCTION id_masking_global(BIGINT) WITH PARAMETER(id)")); + showSql.contains("CREATE GLOBAL ALIAS FUNCTION id_masking_global(bigint) WITH PARAMETER(id)")); } } diff --git a/fe/fe-core/src/test/java/org/apache/doris/analysis/ShowCreateTableStmtTest.java b/fe/fe-core/src/test/java/org/apache/doris/analysis/ShowCreateTableStmtTest.java index 0a5653b7f9ed34..353fbad9fabfc8 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/analysis/ShowCreateTableStmtTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/analysis/ShowCreateTableStmtTest.java @@ -48,7 +48,7 @@ public void testNormal() throws Exception { String sql = "show create table table1"; ShowResultSet showResultSet = showCreateTable(sql); String showSql = showResultSet.getResultRows().get(0).get(1); - Assertions.assertTrue(showSql.contains("`k1` INT NULL COMMENT 'test column k1'")); + Assertions.assertTrue(showSql.contains("`k1` int NULL COMMENT 'test column k1'")); Assertions.assertTrue(showSql.contains("COMMENT 'test table1'")); } diff --git a/fe/fe-core/src/test/java/org/apache/doris/catalog/ColocateTableTest.java b/fe/fe-core/src/test/java/org/apache/doris/catalog/ColocateTableTest.java index 45628bbc315753..6f64ca553b8e86 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/catalog/ColocateTableTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/catalog/ColocateTableTest.java @@ -310,7 +310,7 @@ public void testDistributionColumnsType() throws Exception { + ");"); expectedEx.expect(DdlException.class); - expectedEx.expectMessage("Colocate tables distribution columns must have the same data type: k2(VARCHAR(10)) should be INT"); + expectedEx.expectMessage("Colocate tables distribution columns must have the same data type: k2(varchar(10)) should be int"); createTable("create table " + dbName + "." + tableName2 + " (\n" + " `k1` int NULL COMMENT \"\",\n" + " `k2` varchar(10) NULL COMMENT \"\"\n" diff --git a/fe/fe-core/src/test/java/org/apache/doris/catalog/ColumnTypeTest.java b/fe/fe-core/src/test/java/org/apache/doris/catalog/ColumnTypeTest.java index 7b4965efc4bd70..1b6024765b281d 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/catalog/ColumnTypeTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/catalog/ColumnTypeTest.java @@ -48,7 +48,7 @@ public void testPrimitiveType() throws AnalysisException { type.analyze(null); Assert.assertEquals(PrimitiveType.INT, type.getType().getPrimitiveType()); - Assert.assertEquals("INT", type.toSql()); + Assert.assertEquals("int", type.toSql()); // equal type TypeDef type2 = TypeDef.create(PrimitiveType.INT); @@ -69,7 +69,7 @@ public void testInvalidType() throws AnalysisException { public void testCharType() throws AnalysisException { TypeDef type = TypeDef.createVarchar(10); type.analyze(null); - Assert.assertEquals("VARCHAR(10)", type.toString()); + Assert.assertEquals("varchar(10)", type.toString()); Assert.assertEquals(PrimitiveType.VARCHAR, type.getType().getPrimitiveType()); Assert.assertEquals(10, ((ScalarType) type.getType()).getLength()); @@ -91,10 +91,10 @@ public void testDecimal() throws AnalysisException { TypeDef type = TypeDef.createDecimal(12, 5); type.analyze(null); if (Config.enable_decimal_conversion) { - Assert.assertEquals("DECIMALV3(12, 5)", type.toString()); + Assert.assertEquals("decimalv3(12,5)", type.toString()); Assert.assertEquals(PrimitiveType.DECIMAL64, type.getType().getPrimitiveType()); } else { - Assert.assertEquals("DECIMALV3(12, 5)", type.toString()); + Assert.assertEquals("decimalv3(12,5)", type.toString()); Assert.assertEquals(PrimitiveType.DECIMALV2, type.getType().getPrimitiveType()); } Assert.assertEquals(12, ((ScalarType) type.getType()).getScalarPrecision()); @@ -119,7 +119,7 @@ public void testDecimal() throws AnalysisException { public void testDatetimeV2() throws AnalysisException { TypeDef type = TypeDef.createDatetimeV2(3); type.analyze(null); - Assert.assertEquals("DATETIMEV2(3)", type.toString()); + Assert.assertEquals("datetimev2(3)", type.toString()); Assert.assertEquals(PrimitiveType.DATETIMEV2, type.getType().getPrimitiveType()); Assert.assertEquals(ScalarType.DATETIME_PRECISION, ((ScalarType) type.getType()).getScalarPrecision()); Assert.assertEquals(3, ((ScalarType) type.getType()).getScalarScale()); @@ -160,7 +160,7 @@ public void testDateV2() throws AnalysisException { public void testTimeV2() throws AnalysisException { TypeDef type = TypeDef.createTimeV2(3); type.analyze(null); - Assert.assertEquals("TIME(3)", type.toString()); + Assert.assertEquals("time(3)", type.toString()); Assert.assertEquals(PrimitiveType.TIMEV2, type.getType().getPrimitiveType()); Assert.assertEquals(ScalarType.DATETIME_PRECISION, ((ScalarType) type.getType()).getScalarPrecision()); Assert.assertEquals(3, ((ScalarType) type.getType()).getScalarScale()); diff --git a/fe/fe-core/src/test/java/org/apache/doris/catalog/CreateFunctionTest.java b/fe/fe-core/src/test/java/org/apache/doris/catalog/CreateFunctionTest.java index 76f54eea9f63ad..83217dc0e58cd1 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/catalog/CreateFunctionTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/catalog/CreateFunctionTest.java @@ -114,7 +114,7 @@ public void test() throws Exception { queryStr = "select db1.id_masking(k1) from db1.tbl1"; Assert.assertTrue( - dorisAssert.query(queryStr).explainQuery().contains("concat(left(CAST(CAST(k1 AS BIGINT) AS VARCHAR(65533)), 3), '****', right(CAST(CAST(k1 AS BIGINT) AS VARCHAR(65533)), 4))")); + dorisAssert.query(queryStr).explainQuery().contains("concat(left(CAST(CAST(k1 AS bigint) AS varchar(65533)), 3), '****', right(CAST(CAST(k1 AS bigint) AS varchar(65533)), 4))")); // create alias function with cast // cast any type to decimal with specific precision and scale @@ -142,9 +142,9 @@ public void test() throws Exception { queryStr = "select db1.decimal(k3, 4, 1) from db1.tbl1;"; if (Config.enable_decimal_conversion) { - Assert.assertTrue(dorisAssert.query(queryStr).explainQuery().contains("CAST(`k3` AS DECIMALV3(4, 1))")); + Assert.assertTrue(dorisAssert.query(queryStr).explainQuery().contains("CAST(`k3` AS decimalv3(4,1))")); } else { - Assert.assertTrue(dorisAssert.query(queryStr).explainQuery().contains("CAST(`k3` AS DECIMAL(4, 1))")); + Assert.assertTrue(dorisAssert.query(queryStr).explainQuery().contains("CAST(`k3` AS decimal(4,1))")); } // cast any type to varchar with fixed length @@ -172,7 +172,7 @@ public void test() throws Exception { Assert.assertTrue(constExprLists.get(0).get(0) instanceof StringLiteral); queryStr = "select db1.varchar(k1, 4) from db1.tbl1;"; - Assert.assertTrue(dorisAssert.query(queryStr).explainQuery().contains("CAST(`k1` AS VARCHAR(65533))")); + Assert.assertTrue(dorisAssert.query(queryStr).explainQuery().contains("CAST(`k1` AS varchar(65533))")); // cast any type to char with fixed length createFuncStr = "create alias function db1.to_char(all, int) with parameter(text, length) as " @@ -199,7 +199,7 @@ public void test() throws Exception { Assert.assertTrue(constExprLists.get(0).get(0) instanceof StringLiteral); queryStr = "select db1.to_char(k1, 4) from db1.tbl1;"; - Assert.assertTrue(dorisAssert.query(queryStr).explainQuery().contains("CAST(`k1` AS CHARACTER")); + Assert.assertTrue(dorisAssert.query(queryStr).explainQuery().contains("CAST(`k1` AS character")); } @Test @@ -235,7 +235,7 @@ public void testCreateGlobalFunction() throws Exception { queryStr = "select id_masking(k1) from db2.tbl1"; Assert.assertTrue( - dorisAssert.query(queryStr).explainQuery().contains("concat(left(CAST(CAST(k1 AS BIGINT) AS VARCHAR(65533)), 3), '****', right(CAST(CAST(k1 AS BIGINT) AS VARCHAR(65533)), 4))")); + dorisAssert.query(queryStr).explainQuery().contains("concat(left(CAST(CAST(k1 AS bigint) AS varchar(65533)), 3), '****', right(CAST(CAST(k1 AS bigint) AS varchar(65533)), 4))")); // 4. create alias function with cast // cast any type to decimal with specific precision and scale @@ -252,9 +252,9 @@ public void testCreateGlobalFunction() throws Exception { queryStr = "select decimal(k3, 4, 1) from db2.tbl1;"; if (Config.enable_decimal_conversion) { - Assert.assertTrue(dorisAssert.query(queryStr).explainQuery().contains("CAST(`k3` AS DECIMALV3(4, 1))")); + Assert.assertTrue(dorisAssert.query(queryStr).explainQuery().contains("CAST(`k3` AS decimalv3(4,1))")); } else { - Assert.assertTrue(dorisAssert.query(queryStr).explainQuery().contains("CAST(`k3` AS DECIMAL(4, 1))")); + Assert.assertTrue(dorisAssert.query(queryStr).explainQuery().contains("CAST(`k3` AS decimal(4,1))")); } // 5. cast any type to varchar with fixed length @@ -270,7 +270,7 @@ public void testCreateGlobalFunction() throws Exception { testFunctionQuery(ctx, queryStr, true); queryStr = "select varchar(k1, 4) from db2.tbl1;"; - Assert.assertTrue(dorisAssert.query(queryStr).explainQuery().contains("CAST(`k1` AS VARCHAR(65533))")); + Assert.assertTrue(dorisAssert.query(queryStr).explainQuery().contains("CAST(`k1` AS varchar(65533))")); // 6. cast any type to char with fixed length createFuncStr = "create global alias function db2.to_char(all, int) with parameter(text, length) as " @@ -285,7 +285,7 @@ public void testCreateGlobalFunction() throws Exception { testFunctionQuery(ctx, queryStr, true); queryStr = "select to_char(k1, 4) from db2.tbl1;"; - Assert.assertTrue(dorisAssert.query(queryStr).explainQuery().contains("CAST(`k1` AS CHARACTER(255))")); + Assert.assertTrue(dorisAssert.query(queryStr).explainQuery().contains("CAST(`k1` AS character(255))")); } private void testFunctionQuery(ConnectContext ctx, String queryStr, Boolean isStringLiteral) throws Exception { diff --git a/fe/fe-core/src/test/java/org/apache/doris/external/elasticsearch/EsUtilTest.java b/fe/fe-core/src/test/java/org/apache/doris/external/elasticsearch/EsUtilTest.java index 025876fd06effb..f5b3133fbf7a09 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/external/elasticsearch/EsUtilTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/external/elasticsearch/EsUtilTest.java @@ -227,25 +227,25 @@ public void testDateType() throws IOException, URISyntaxException { String name = column.getName(); String type = column.getType().toSql(); if ("test2".equals(name)) { - Assertions.assertEquals("DATETIMEV2(0)", type); + Assertions.assertEquals("datetimev2(0)", type); } if ("test3".equals(name)) { - Assertions.assertEquals("DATETIMEV2(0)", type); + Assertions.assertEquals("datetimev2(0)", type); } if ("test4".equals(name)) { - Assertions.assertEquals("DATEV2", type); + Assertions.assertEquals("datev2", type); } if ("test5".equals(name)) { - Assertions.assertEquals("DATETIMEV2(0)", type); + Assertions.assertEquals("datetimev2(0)", type); } if ("test6".equals(name)) { - Assertions.assertEquals("DATEV2", type); + Assertions.assertEquals("datev2", type); } if ("test7".equals(name)) { - Assertions.assertEquals("DATETIMEV2(0)", type); + Assertions.assertEquals("datetimev2(0)", type); } if ("test8".equals(name)) { - Assertions.assertEquals("BIGINT", type); + Assertions.assertEquals("bigint", type); } } } @@ -255,8 +255,8 @@ public void testFieldAlias() throws IOException, URISyntaxException { ObjectNode testFieldAlias = EsUtil.getRootSchema( EsUtil.getMapping(loadJsonFromFile("data/es/test_field_alias.json")), null, new ArrayList<>()); List parseColumns = EsUtil.genColumnsFromEs("test_field_alias", null, testFieldAlias, true, new ArrayList<>()); - Assertions.assertEquals("DATETIMEV2(0)", parseColumns.get(2).getType().toSql()); - Assertions.assertEquals("TEXT", parseColumns.get(4).getType().toSql()); + Assertions.assertEquals("datetimev2(0)", parseColumns.get(2).getType().toSql()); + Assertions.assertEquals("text", parseColumns.get(4).getType().toSql()); } @Test diff --git a/fe/fe-core/src/test/java/org/apache/doris/planner/QueryPlanTest.java b/fe/fe-core/src/test/java/org/apache/doris/planner/QueryPlanTest.java index e6bb0dd9cfcf71..2e44dcec9e2aee 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/planner/QueryPlanTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/planner/QueryPlanTest.java @@ -564,20 +564,20 @@ public void testTypeCast() throws Exception { // disable cast hll/bitmap to string assertSQLPlanOrErrorMsgContains( "select cast(id2 as varchar) from test.hll_table;", - "Invalid type cast of `id2` from HLL to VARCHAR(65533)" + "Invalid type cast of `id2` from hll to varchar(65533)" ); assertSQLPlanOrErrorMsgContains( "select cast(id2 as varchar) from test.bitmap_table;", - "Invalid type cast of `id2` from BITMAP to VARCHAR(65533)" + "Invalid type cast of `id2` from bitmap to varchar(65533)" ); // disable implicit cast hll/bitmap to string assertSQLPlanOrErrorMsgContains( "select length(id2) from test.hll_table;", - "No matching function with signature: length(HLL)" + "No matching function with signature: length(hll)" ); assertSQLPlanOrErrorMsgContains( "select length(id2) from test.bitmap_table;", - "No matching function with signature: length(BITMAP)" + "No matching function with signature: length(bitmap)" ); } @@ -2062,7 +2062,7 @@ public void testResultExprs() throws Exception { Assert.assertFalse(explainString.contains("OUTPUT EXPRS:\n 3\n 4")); System.out.println(explainString); Assert.assertTrue(explainString.contains( - "OUTPUT EXPRS:\n" + " CAST( 3 AS INT)\n" + " CAST( 4 AS INT)")); + "OUTPUT EXPRS:\n" + " CAST( 3 AS int)\n" + " CAST( 4 AS int)")); } @Test diff --git a/fe/fe-core/src/test/java/org/apache/doris/planner/RuntimeFilterGeneratorTest.java b/fe/fe-core/src/test/java/org/apache/doris/planner/RuntimeFilterGeneratorTest.java index a7c8f8ed79c265..96d329ecb46d0d 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/planner/RuntimeFilterGeneratorTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/planner/RuntimeFilterGeneratorTest.java @@ -156,12 +156,12 @@ public void testGenerateRuntimeFiltersMode() { Assert.assertEquals(hashJoinNode.getRuntimeFilters().size(), 4); Assert.assertEquals(lhsScanNode.getRuntimeFilters().size(), 4); String rfString = hashJoinNode.getRuntimeFilterExplainString(true); - Assert.assertTrue(rfString, rfString.contains("RF000[in] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS BIGINT)")); - Assert.assertTrue(rfString.contains("RF001[bloom] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS BIGINT)")); + Assert.assertTrue(rfString, rfString.contains("RF000[in] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS bigint)")); + Assert.assertTrue(rfString.contains("RF001[bloom] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS bigint)")); Assert.assertTrue(rfString.contains( - "RF002[min_max] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS BIGINT)")); + "RF002[min_max] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS bigint)")); Assert.assertTrue(rfString.contains( - "RF003[in_or_bloom] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS BIGINT")); + "RF003[in_or_bloom] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS bigint")); rfString = lhsScanNode.getRuntimeFilterExplainString(false); Assert.assertTrue(rfString, rfString.contains("RF000[in] -> `default_cluster:test_db`.`test_lhs_tbl`.`test_lhs_col`")); @@ -186,12 +186,12 @@ public void testGenerateRuntimeFiltersMode() { Assert.assertEquals(lhsScanNode.getRuntimeFilters().size(), 4); rfString = hashJoinNode.getRuntimeFilterExplainString(true); Assert.assertTrue(rfString, rfString.contains( - "RF000[in] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS BIGINT)")); - Assert.assertTrue(rfString.contains("RF001[bloom] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS BIGINT)")); + "RF000[in] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS bigint)")); + Assert.assertTrue(rfString.contains("RF001[bloom] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS bigint)")); Assert.assertTrue(rfString.contains( - "RF002[min_max] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS BIGINT)")); + "RF002[min_max] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS bigint)")); Assert.assertTrue(rfString.contains( - "RF003[in_or_bloom] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS BIGINT)")); + "RF003[in_or_bloom] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS bigint)")); rfString = lhsScanNode.getRuntimeFilterExplainString(false); Assert.assertTrue(rfString, rfString.contains( "RF000[in] -> `default_cluster:test_db`.`test_lhs_tbl`.`test_lhs_col`")); @@ -260,7 +260,7 @@ public void testGenerateRuntimeFiltersType() { }; RuntimeFilterGenerator.generateRuntimeFilters(analyzer, hashJoinNode); Assert.assertEquals(hashJoinNode.getRuntimeFilterExplainString(true), - "RF000[in] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS BIGINT)(-1/0/2097152)\n", + "RF000[in] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS bigint)(-1/0/2097152)\n", hashJoinNode.getRuntimeFilterExplainString(true)); Assert.assertEquals(lhsScanNode.getRuntimeFilterExplainString(false), lhsScanNode.getRuntimeFilterExplainString(false), @@ -280,7 +280,7 @@ public void testGenerateRuntimeFiltersType() { }; RuntimeFilterGenerator.generateRuntimeFilters(analyzer, hashJoinNode); Assert.assertEquals(hashJoinNode.getRuntimeFilterExplainString(true), - "RF000[bloom] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS BIGINT)(-1/0/2097152)\n"); + "RF000[bloom] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS bigint)(-1/0/2097152)\n"); Assert.assertEquals(lhsScanNode.getRuntimeFilterExplainString(false), "RF000[bloom] -> `default_cluster:test_db`.`test_lhs_tbl`.`test_lhs_col`\n"); Assert.assertEquals(testPlanFragment.getTargetRuntimeFilterIds().size(), 1); @@ -299,9 +299,9 @@ public void testGenerateRuntimeFiltersType() { RuntimeFilterGenerator.generateRuntimeFilters(analyzer, hashJoinNode); String rfString = hashJoinNode.getRuntimeFilterExplainString(true); Assert.assertTrue(rfString, rfString.contains( - "RF000[in] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS BIGINT)")); + "RF000[in] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS bigint)")); Assert.assertTrue(rfString, rfString.contains( - "RF001[bloom] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS BIGINT)")); + "RF001[bloom] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS bigint)")); rfString = lhsScanNode.getRuntimeFilterExplainString(false); Assert.assertTrue(rfString, rfString.contains( "RF000[in] -> `default_cluster:test_db`.`test_lhs_tbl`.`test_lhs_col`")); @@ -322,7 +322,7 @@ public void testGenerateRuntimeFiltersType() { }; RuntimeFilterGenerator.generateRuntimeFilters(analyzer, hashJoinNode); Assert.assertEquals(hashJoinNode.getRuntimeFilterExplainString(true), - "RF000[min_max] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS BIGINT)(-1/0/2097152)\n"); + "RF000[min_max] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS bigint)(-1/0/2097152)\n"); Assert.assertEquals(lhsScanNode.getRuntimeFilterExplainString(false), "RF000[min_max] -> `default_cluster:test_db`.`test_lhs_tbl`.`test_lhs_col`\n"); Assert.assertEquals(testPlanFragment.getTargetRuntimeFilterIds().size(), 1); @@ -341,9 +341,9 @@ public void testGenerateRuntimeFiltersType() { RuntimeFilterGenerator.generateRuntimeFilters(analyzer, hashJoinNode); rfString = hashJoinNode.getRuntimeFilterExplainString(true); Assert.assertTrue(rfString.contains( - "RF000[in] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS BIGINT)")); + "RF000[in] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS bigint)")); Assert.assertTrue(rfString.contains( - "RF001[min_max] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS BIGINT)")); + "RF001[min_max] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS bigint)")); rfString = lhsScanNode.getRuntimeFilterExplainString(false); Assert.assertTrue(rfString.contains( "RF000[in] -> `default_cluster:test_db`.`test_lhs_tbl`.`test_lhs_col`")); @@ -365,9 +365,9 @@ public void testGenerateRuntimeFiltersType() { RuntimeFilterGenerator.generateRuntimeFilters(analyzer, hashJoinNode); rfString = hashJoinNode.getRuntimeFilterExplainString(true); Assert.assertTrue(rfString.contains( - "RF000[bloom] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS BIGINT)")); + "RF000[bloom] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS bigint)")); Assert.assertTrue(rfString.contains( - "RF001[min_max] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS BIGINT)")); + "RF001[min_max] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS bigint)")); rfString = lhsScanNode.getRuntimeFilterExplainString(false); Assert.assertTrue(rfString.contains( @@ -390,11 +390,11 @@ public void testGenerateRuntimeFiltersType() { RuntimeFilterGenerator.generateRuntimeFilters(analyzer, hashJoinNode); rfString = hashJoinNode.getRuntimeFilterExplainString(true); Assert.assertTrue(rfString.contains( - "RF000[in] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS BIGINT)")); + "RF000[in] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS bigint)")); Assert.assertTrue(rfString.contains( - "RF001[bloom] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS BIGINT)")); + "RF001[bloom] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS bigint)")); Assert.assertTrue(rfString.contains( - "RF002[min_max] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS BIGINT)")); + "RF002[min_max] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS bigint)")); rfString = lhsScanNode.getRuntimeFilterExplainString(false); Assert.assertTrue(rfString.contains( "RF000[in] -> `default_cluster:test_db`.`test_lhs_tbl`.`test_lhs_col`")); @@ -417,7 +417,7 @@ public void testGenerateRuntimeFiltersType() { }; RuntimeFilterGenerator.generateRuntimeFilters(analyzer, hashJoinNode); Assert.assertEquals(hashJoinNode.getRuntimeFilterExplainString(true), - "RF000[in_or_bloom] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS BIGINT)(-1/0/2097152)\n"); + "RF000[in_or_bloom] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS bigint)(-1/0/2097152)\n"); Assert.assertEquals(lhsScanNode.getRuntimeFilterExplainString(false), "RF000[in_or_bloom] -> `default_cluster:test_db`.`test_lhs_tbl`.`test_lhs_col`\n"); Assert.assertEquals(testPlanFragment.getTargetRuntimeFilterIds().size(), 1); @@ -436,9 +436,9 @@ public void testGenerateRuntimeFiltersType() { RuntimeFilterGenerator.generateRuntimeFilters(analyzer, hashJoinNode); rfString = hashJoinNode.getRuntimeFilterExplainString(true); Assert.assertTrue(rfString.contains( - "RF000[in] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS BIGINT)")); + "RF000[in] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS bigint)")); Assert.assertTrue(rfString.contains( - "RF001[in_or_bloom] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS BIGINT)")); + "RF001[in_or_bloom] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS bigint)")); rfString = lhsScanNode.getRuntimeFilterExplainString(false); Assert.assertTrue(rfString.contains( @@ -461,9 +461,9 @@ public void testGenerateRuntimeFiltersType() { RuntimeFilterGenerator.generateRuntimeFilters(analyzer, hashJoinNode); rfString = hashJoinNode.getRuntimeFilterExplainString(true); Assert.assertTrue(rfString.contains( - "RF000[bloom] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS BIGINT)")); + "RF000[bloom] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS bigint)")); Assert.assertTrue(rfString.contains( - "RF001[in_or_bloom] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS BIGINT)")); + "RF001[in_or_bloom] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS bigint)")); rfString = lhsScanNode.getRuntimeFilterExplainString(false); Assert.assertTrue(rfString.contains( "RF000[bloom] -> `default_cluster:test_db`.`test_lhs_tbl`.`test_lhs_col`")); @@ -485,11 +485,11 @@ public void testGenerateRuntimeFiltersType() { RuntimeFilterGenerator.generateRuntimeFilters(analyzer, hashJoinNode); rfString = hashJoinNode.getRuntimeFilterExplainString(true); Assert.assertTrue(rfString.contains( - "RF000[in] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS BIGINT)")); + "RF000[in] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS bigint)")); Assert.assertTrue(rfString.contains( - "RF001[bloom] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS BIGINT)")); + "RF001[bloom] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS bigint)")); Assert.assertTrue(rfString.contains( - "RF002[in_or_bloom] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS BIGINT)")); + "RF002[in_or_bloom] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS bigint)")); rfString = lhsScanNode.getRuntimeFilterExplainString(false); Assert.assertTrue(rfString.contains( "RF000[in] -> `default_cluster:test_db`.`test_lhs_tbl`.`test_lhs_col`")); @@ -513,9 +513,9 @@ public void testGenerateRuntimeFiltersType() { RuntimeFilterGenerator.generateRuntimeFilters(analyzer, hashJoinNode); rfString = hashJoinNode.getRuntimeFilterExplainString(true); Assert.assertTrue(rfString.contains( - "RF000[min_max] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS BIGINT)")); + "RF000[min_max] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS bigint)")); Assert.assertTrue(rfString.contains( - "RF001[in_or_bloom] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS BIGINT)")); + "RF001[in_or_bloom] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS bigint)")); rfString = lhsScanNode.getRuntimeFilterExplainString(false); Assert.assertTrue(rfString.contains( "RF000[min_max] -> `default_cluster:test_db`.`test_lhs_tbl`.`test_lhs_col`")); @@ -537,11 +537,11 @@ public void testGenerateRuntimeFiltersType() { RuntimeFilterGenerator.generateRuntimeFilters(analyzer, hashJoinNode); rfString = hashJoinNode.getRuntimeFilterExplainString(true); Assert.assertTrue(rfString.contains( - "RF000[in] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS BIGINT)")); + "RF000[in] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS bigint)")); Assert.assertTrue(rfString.contains( - "RF001[min_max] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS BIGINT)")); + "RF001[min_max] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS bigint)")); Assert.assertTrue(rfString.contains( - "RF002[in_or_bloom] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS BIGINT)")); + "RF002[in_or_bloom] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS bigint)")); rfString = lhsScanNode.getRuntimeFilterExplainString(false); Assert.assertTrue(rfString.contains( "RF000[in] -> `default_cluster:test_db`.`test_lhs_tbl`.`test_lhs_col`")); @@ -566,11 +566,11 @@ public void testGenerateRuntimeFiltersType() { RuntimeFilterGenerator.generateRuntimeFilters(analyzer, hashJoinNode); rfString = hashJoinNode.getRuntimeFilterExplainString(true); Assert.assertTrue(rfString.contains( - "RF000[bloom] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS BIGINT)")); + "RF000[bloom] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS bigint)")); Assert.assertTrue(rfString.contains( - "RF001[min_max] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS BIGINT)")); + "RF001[min_max] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS bigint)")); Assert.assertTrue(rfString.contains( - "RF002[in_or_bloom] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS BIGINT)")); + "RF002[in_or_bloom] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS bigint)")); rfString = lhsScanNode.getRuntimeFilterExplainString(false); Assert.assertTrue(rfString.contains( "RF000[bloom] -> `default_cluster:test_db`.`test_lhs_tbl`.`test_lhs_col`")); @@ -594,13 +594,13 @@ public void testGenerateRuntimeFiltersType() { RuntimeFilterGenerator.generateRuntimeFilters(analyzer, hashJoinNode); rfString = hashJoinNode.getRuntimeFilterExplainString(true); Assert.assertTrue(rfString.contains( - "RF000[in] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS BIGINT)")); + "RF000[in] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS bigint)")); Assert.assertTrue(rfString.contains( - "RF001[bloom] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS BIGINT)")); + "RF001[bloom] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS bigint)")); Assert.assertTrue(rfString.contains( - "RF002[min_max] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS BIGINT)")); + "RF002[min_max] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS bigint)")); Assert.assertTrue(rfString.contains( - "RF003[in_or_bloom] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS BIGINT)")); + "RF003[in_or_bloom] <- CAST(`default_cluster:test_db`.`test_rhs_tbl`.`test_rhs_col` AS bigint)")); rfString = lhsScanNode.getRuntimeFilterExplainString(false); Assert.assertTrue(rfString.contains( "RF000[in] -> `default_cluster:test_db`.`test_lhs_tbl`.`test_lhs_col`")); diff --git a/fe/fe-core/src/test/java/org/apache/doris/planner/TableFunctionPlanTest.java b/fe/fe-core/src/test/java/org/apache/doris/planner/TableFunctionPlanTest.java index b8eaec685a8209..a02b361b1c335c 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/planner/TableFunctionPlanTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/planner/TableFunctionPlanTest.java @@ -79,7 +79,7 @@ public void normalTableFunction() throws Exception { explainString.contains("table function: explode_split(`default_cluster:db1`.`tbl1`.`k2`, ',')")); Assert.assertTrue(explainString.contains("tuple ids: 0 1")); Assert.assertTrue(explainString.contains("TupleDescriptor{id=1, tbl=tmp, byteSize=32}")); - Assert.assertTrue(explainString.contains("SlotDescriptor{id=1, col=e1, colUniqueId=-1, type=VARCHAR")); + Assert.assertTrue(explainString.contains("SlotDescriptor{id=1, col=e1, colUniqueId=-1, type=varchar")); } /* Case2 without output explode column @@ -95,7 +95,7 @@ public void withoutOutputExplodeColumn() throws Exception { explainString.contains("table function: explode_split(`default_cluster:db1`.`tbl1`.`k2`, ',')")); Assert.assertTrue(explainString.contains("tuple ids: 0 1")); Assert.assertTrue(explainString.contains("TupleDescriptor{id=1, tbl=tmp, byteSize=32}")); - Assert.assertTrue(explainString.contains("SlotDescriptor{id=1, col=e1, colUniqueId=-1, type=VARCHAR")); + Assert.assertTrue(explainString.contains("SlotDescriptor{id=1, col=e1, colUniqueId=-1, type=varchar")); } /* Case3 group by explode column @@ -116,7 +116,7 @@ public void groupByExplodeColumn() throws Exception { explainString.contains("table function: explode_split(`default_cluster:db1`.`tbl1`.`k2`, ',')")); Assert.assertTrue(explainString.contains("tuple ids: 0 1")); Assert.assertTrue(explainString.contains("TupleDescriptor{id=1, tbl=tmp, byteSize=32}")); - Assert.assertTrue(explainString.contains("SlotDescriptor{id=1, col=e1, colUniqueId=-1, type=VARCHAR")); + Assert.assertTrue(explainString.contains("SlotDescriptor{id=1, col=e1, colUniqueId=-1, type=varchar")); // group by tuple Assert.assertTrue(explainString.contains("TupleDescriptor{id=2, tbl=null, byteSize=32}")); } @@ -135,7 +135,7 @@ public void whereExplodeColumn() throws Exception { Assert.assertTrue(explainString.contains("PREDICATES: `e1` = '1'")); Assert.assertTrue(explainString.contains("tuple ids: 0 1")); Assert.assertTrue(explainString.contains("TupleDescriptor{id=1, tbl=tmp, byteSize=32}")); - Assert.assertTrue(explainString.contains("SlotDescriptor{id=1, col=e1, colUniqueId=-1, type=VARCHAR")); + Assert.assertTrue(explainString.contains("SlotDescriptor{id=1, col=e1, colUniqueId=-1, type=varchar")); } /* Case5 where normal column @@ -151,7 +151,7 @@ public void whereNormalColumn() throws Exception { explainString.contains("table function: explode_split(`default_cluster:db1`.`tbl1`.`k2`, ',')")); Assert.assertTrue(explainString.contains("tuple ids: 0 1")); Assert.assertTrue(explainString.contains("TupleDescriptor{id=1, tbl=tmp, byteSize=32}")); - Assert.assertTrue(explainString.contains("SlotDescriptor{id=1, col=e1, colUniqueId=-1, type=VARCHAR")); + Assert.assertTrue(explainString.contains("SlotDescriptor{id=1, col=e1, colUniqueId=-1, type=varchar")); Assert.assertTrue(UtFrameUtils.checkPlanResultContainsNode(explainString, 0, "OlapScanNode")); Assert.assertTrue(explainString.contains("PREDICATES: `k1` = 1")); } @@ -171,10 +171,10 @@ public void testMultiLateralView() throws Exception { Assert.assertTrue(explainString.contains("lateral view tuple id: 1 2")); // lateral view 2 tuple Assert.assertTrue(explainString.contains("TupleDescriptor{id=1, tbl=tmp2, byteSize=32}")); - Assert.assertTrue(explainString.contains("SlotDescriptor{id=1, col=e2, colUniqueId=-1, type=VARCHAR")); + Assert.assertTrue(explainString.contains("SlotDescriptor{id=1, col=e2, colUniqueId=-1, type=varchar")); // lateral view 1 tuple Assert.assertTrue(explainString.contains("TupleDescriptor{id=2, tbl=tmp1, byteSize=32}")); - Assert.assertTrue(explainString.contains("SlotDescriptor{id=2, col=e1, colUniqueId=-1, type=VARCHAR")); + Assert.assertTrue(explainString.contains("SlotDescriptor{id=2, col=e1, colUniqueId=-1, type=varchar")); } // test explode_split function @@ -188,11 +188,11 @@ public void testMultiLateralView() throws Exception { public void errorParam() throws Exception { String sql = "explain select /*+ SET_VAR(enable_nereids_planner=false) */ k1, e1 from db1.tbl1 lateral view explode_split(k2) tmp as e1;"; String explainString = UtFrameUtils.getSQLPlanOrErrorMsg(ctx, sql); - Assert.assertTrue(explainString.contains("No matching function with signature: explode_split(VARCHAR(1))")); + Assert.assertTrue(explainString.contains("No matching function with signature: explode_split(varchar(1))")); sql = "explain select /*+ SET_VAR(enable_nereids_planner=false) */ k1, e1 from db1.tbl1 lateral view explode_split(k1) tmp as e1;"; explainString = UtFrameUtils.getSQLPlanOrErrorMsg(ctx, sql); - Assert.assertTrue(explainString.contains("No matching function with signature: explode_split(INT)")); + Assert.assertTrue(explainString.contains("No matching function with signature: explode_split(int)")); } /* Case2 table function in where stmt @@ -203,7 +203,7 @@ public void tableFunctionInWhere() throws Exception { String sql = "explain select /*+ SET_VAR(enable_nereids_planner=false) */ k1 from db1.tbl1 where explode_split(k2, \",\");"; String explainString = UtFrameUtils.getSQLPlanOrErrorMsg(ctx, sql); Assert.assertTrue(explainString, - explainString.contains("No matching function with signature: explode_split(VARCHAR(1), VARCHAR(65533)).")); + explainString.contains("No matching function with signature: explode_split(varchar(1), varchar(65533)).")); } // test projection @@ -350,8 +350,8 @@ public void scalarFunctionInLateralView() throws Exception { explainString.contains("table function: explode_split(concat(`a`.`k2`, ',', `a`.`k3`), ',')")); Assert.assertTrue(explainString.contains("lateral view tuple id: 1")); Assert.assertTrue(explainString.contains("output slot id: 3")); - Assert.assertTrue(explainString.contains("SlotDescriptor{id=0, col=k2, colUniqueId=1, type=VARCHAR(1)")); - Assert.assertTrue(explainString.contains("SlotDescriptor{id=1, col=k3, colUniqueId=2, type=VARCHAR(1)")); + Assert.assertTrue(explainString.contains("SlotDescriptor{id=0, col=k2, colUniqueId=1, type=varchar(1)")); + Assert.assertTrue(explainString.contains("SlotDescriptor{id=1, col=k3, colUniqueId=2, type=varchar(1)")); } // lateral view of subquery @@ -368,7 +368,7 @@ public void lateralViewColumnOfReduceTuple() throws Exception { Assert.assertTrue(explainString.contains("lateral view tuple id: 2")); Assert.assertTrue(explainString.contains("output slot id: 2")); Assert.assertTrue(explainString.contains("tuple ids: 0 2")); - Assert.assertTrue(explainString.contains("SlotDescriptor{id=2, col=e1, colUniqueId=-1, type=VARCHAR")); + Assert.assertTrue(explainString.contains("SlotDescriptor{id=2, col=e1, colUniqueId=-1, type=varchar")); } /* @@ -384,7 +384,7 @@ public void aggInlineView() throws Exception { Assert.assertTrue(explainString.contains("lateral view tuple id: 3")); Assert.assertTrue(explainString.contains("output slot id: 3")); Assert.assertTrue(explainString.contains("tuple ids: 1 3")); - Assert.assertTrue(explainString.contains("SlotDescriptor{id=3, col=e1, colUniqueId=-1, type=VARCHAR")); + Assert.assertTrue(explainString.contains("SlotDescriptor{id=3, col=e1, colUniqueId=-1, type=varchar")); } /* @@ -404,19 +404,19 @@ public void aggColumnInlineViewInTB() throws Exception { String formatString = explainString.replaceAll(" ", ""); System.out.println(formatString); Assert.assertTrue(formatString.contains( - "SlotDescriptor{id=0,col=k1,colUniqueId=0,type=INT" + "SlotDescriptor{id=0,col=k1,colUniqueId=0,type=int" )); Assert.assertTrue(formatString.contains( - "SlotDescriptor{id=1,col=k2,colUniqueId=1,type=VARCHAR(1)" + "SlotDescriptor{id=1,col=k2,colUniqueId=1,type=varchar(1)" )); Assert.assertTrue(formatString.contains( - "SlotDescriptor{id=2,col=k1,colUniqueId=0,type=INT" + "SlotDescriptor{id=2,col=k1,colUniqueId=0,type=int" )); Assert.assertTrue(formatString.contains( - "SlotDescriptor{id=3,col=null,colUniqueId=null,type=VARCHAR" + "SlotDescriptor{id=3,col=null,colUniqueId=null,type=varchar" )); Assert.assertTrue(formatString.contains( - "SlotDescriptor{id=6,col=e1,colUniqueId=-1,type=VARCHAR" + "SlotDescriptor{id=6,col=e1,colUniqueId=-1,type=varchar" )); } diff --git a/fe/fe-core/src/test/java/org/apache/doris/rewrite/ExtractCommonFactorsRuleFunctionTest.java b/fe/fe-core/src/test/java/org/apache/doris/rewrite/ExtractCommonFactorsRuleFunctionTest.java index 3c55d248544be8..d5a4ba2d9d3859 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/rewrite/ExtractCommonFactorsRuleFunctionTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/rewrite/ExtractCommonFactorsRuleFunctionTest.java @@ -273,27 +273,27 @@ public void testRewriteLikePredicate() throws Exception { // tinyint String sql = "select /*+ SET_VAR(enable_nereids_planner=false) */ * from tb3 where k1 like '%4%';"; LOG.info("EXPLAIN:{}", dorisAssert.query(sql).explainQuery()); - dorisAssert.query(sql).explainContains("CAST(`k1` AS VARCHAR(65533)) LIKE '%4%'"); + dorisAssert.query(sql).explainContains("CAST(`k1` AS varchar(65533)) LIKE '%4%'"); // smallint sql = "select /*+ SET_VAR(enable_nereids_planner=false) */ * from tb3 where k2 like '%4%';"; LOG.info("EXPLAIN:{}", dorisAssert.query(sql).explainQuery()); - dorisAssert.query(sql).explainContains("CAST(`k2` AS VARCHAR(65533)) LIKE '%4%'"); + dorisAssert.query(sql).explainContains("CAST(`k2` AS varchar(65533)) LIKE '%4%'"); // int sql = "select /*+ SET_VAR(enable_nereids_planner=false) */ * from tb3 where k3 like '%4%';"; LOG.info("EXPLAIN:{}", dorisAssert.query(sql).explainQuery()); - dorisAssert.query(sql).explainContains("CAST(`k3` AS VARCHAR(65533)) LIKE '%4%'"); + dorisAssert.query(sql).explainContains("CAST(`k3` AS varchar(65533)) LIKE '%4%'"); // bigint sql = "select /*+ SET_VAR(enable_nereids_planner=false) */ * from tb3 where k4 like '%4%';"; LOG.info("EXPLAIN:{}", dorisAssert.query(sql).explainQuery()); - dorisAssert.query(sql).explainContains("CAST(`k4` AS VARCHAR(65533)) LIKE '%4%'"); + dorisAssert.query(sql).explainContains("CAST(`k4` AS varchar(65533)) LIKE '%4%'"); // largeint sql = "select /*+ SET_VAR(enable_nereids_planner=false) */ * from tb3 where k5 like '%4%';"; LOG.info("EXPLAIN:{}", dorisAssert.query(sql).explainQuery()); - dorisAssert.query(sql).explainContains("CAST(`k5` AS VARCHAR(65533)) LIKE '%4%'"); + dorisAssert.query(sql).explainContains("CAST(`k5` AS varchar(65533)) LIKE '%4%'"); } @Test diff --git a/fe/fe-core/src/test/java/org/apache/doris/rewrite/InferFiltersRuleTest.java b/fe/fe-core/src/test/java/org/apache/doris/rewrite/InferFiltersRuleTest.java index 230d102e1eefa4..182f2d3b3bee3c 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/rewrite/InferFiltersRuleTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/rewrite/InferFiltersRuleTest.java @@ -200,7 +200,7 @@ public void testOnIsNotNullPredicate() throws Exception { + " where tb1.k1 = tb2.k1 and tb2.k1 = tb3.k1 and tb2.k1 = 1"; String planString = dorisAssert.query(query).explainQuery(); Assert.assertTrue(planString.contains("`tb1`.`k1` = 1")); - Assert.assertTrue(planString, planString.contains("CAST(`tb3`.`k1` AS INT)")); + Assert.assertTrue(planString, planString.contains("CAST(`tb3`.`k1` AS int)")); } @Test @@ -280,7 +280,7 @@ public void testWhere3Tables1stInner2ndRightJoinEqLiteralAt2nd() throws Exceptio + " where tb1.k1 = tb2.k1 and tb2.k1 = tb3.k1 and tb2.k1 = 1"; String planString = dorisAssert.query(query).explainQuery(); Assert.assertTrue(planString, planString.contains("`tb1`.`k1` = 1")); - Assert.assertTrue(planString, planString.contains("CAST(`tb3`.`k1` AS INT) = 1")); + Assert.assertTrue(planString, planString.contains("CAST(`tb3`.`k1` AS int) = 1")); } @Test diff --git a/fe/fe-core/src/test/java/org/apache/doris/statistics/HistogramTest.java b/fe/fe-core/src/test/java/org/apache/doris/statistics/HistogramTest.java index b5ca8d8095c2d9..a6278df5231bd0 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/statistics/HistogramTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/statistics/HistogramTest.java @@ -94,8 +94,8 @@ void testSerializeToJson() throws AnalysisException { JsonObject histogramJson = JsonParser.parseString(json).getAsJsonObject(); String typeStr = histogramJson.get("data_type").getAsString(); - Assertions.assertEquals("DATETIME", typeStr); - Type datatype = Type.fromPrimitiveType(PrimitiveType.valueOf(typeStr)); + Assertions.assertEquals("datetime", typeStr); + Type datatype = Type.fromPrimitiveType(PrimitiveType.valueOf(typeStr.toUpperCase())); Assertions.assertNotNull(datatype); int numBuckets = histogramJson.get("num_buckets").getAsInt(); diff --git a/regression-test/data/bloom_filter_p0/test_create_table_with_bloom_filter.out b/regression-test/data/bloom_filter_p0/test_create_table_with_bloom_filter.out index 0409ab7fb3c0d7..20d5b03aff9b3a 100644 --- a/regression-test/data/bloom_filter_p0/test_create_table_with_bloom_filter.out +++ b/regression-test/data/bloom_filter_p0/test_create_table_with_bloom_filter.out @@ -3,56 +3,56 @@ 1 2 4 8 50string 500varchar c 65535varchar 0.000000 123456789012345678.123456789 111.1 11222323232.1 11345643534234231.1 2013-12-01 1900-01-01T00:00 2013-12-01 1900-01-01T00:00 1900-01-01T00:00:00.111 1900-01-01T00:00:00.111111 1 2 4 8 50string 500varchar_replace c 65535varchar 12345678901234.123456 123456789012345678.123456789 111.1 11222323232.1 11345643534234231.1 1900-01-01 1900-01-01 1900-01-01 1900-01-01T00:00 1900-01-01T00:00 1900-01-01T00:00 2013-12-01 2013-12-01 2013-12-01 1900-01-01T00:00 1900-01-01T00:00 1900-01-01T00:00 1900-01-01T00:00:00.111 1900-01-01T00:00:00.111 1900-01-01T00:00:00.111 1900-01-01T00:00:00.111111 1900-01-01T00:00:00.111111 1900-01-01T00:00:00.111111 0.4 0.8 -- !desc_tb -- -tinyint_key TINYINT No true \N -smallint_key SMALLINT No true \N BLOOM_FILTER -int_key INT No true \N BLOOM_FILTER -bigint_key BIGINT No true \N BLOOM_FILTER -char_50_key CHAR(50) No true \N BLOOM_FILTER -character_key VARCHAR(500) No true \N BLOOM_FILTER -char_key CHAR(1) No true \N BLOOM_FILTER -character_most_key VARCHAR(65533) No true \N BLOOM_FILTER -decimal_key DECIMAL(20, 6) No true \N BLOOM_FILTER -decimal_most_key DECIMAL(27, 9) No true \N BLOOM_FILTER -decimal32_key DECIMAL(5, 1) No true \N BLOOM_FILTER -decimal64_key DECIMAL(14, 1) No true \N BLOOM_FILTER -decimal128_key DECIMAL(38, 1) No true \N BLOOM_FILTER -date_key DATE No true \N BLOOM_FILTER -datetime_key DATETIME No true \N BLOOM_FILTER -datev2_key DATE No true \N BLOOM_FILTER -datetimev2_key_1 DATETIME No true \N BLOOM_FILTER -datetimev2_key_2 DATETIME(3) No true \N BLOOM_FILTER -datetimev2_key_3 DATETIME(6) No true \N BLOOM_FILTER -tinyint_value TINYINT No false \N SUM -smallint_value SMALLINT No false \N SUM -int_value INT No false \N SUM -bigint_value BIGINT No false \N SUM -char_50_value CHAR(50) No false \N REPLACE -character_value VARCHAR(500) No false \N REPLACE -char_value CHAR(1) No false \N REPLACE -character_most_value VARCHAR(65533) No false \N REPLACE -decimal_value DECIMAL(20, 6) No false \N SUM -decimal_most_value DECIMAL(27, 9) No false \N SUM -decimal32_value DECIMAL(5, 1) No false \N SUM -decimal64_value DECIMAL(14, 1) No false \N SUM -decimal128_value DECIMAL(38, 1) No false \N SUM -date_value_max DATE No false \N MAX -date_value_replace DATE No false \N REPLACE -date_value_min DATE No false \N MIN -datetime_value_max DATETIME No false \N MAX -datetime_value_replace DATETIME No false \N REPLACE -datetime_value_min DATETIME No false \N MIN -datev2_value_max DATE No false \N MAX -datev2_value_replace DATE No false \N REPLACE -datev2_value_min DATE No false \N MIN -datetimev2_value_1_max DATETIME No false \N MAX -datetimev2_value_1_replace DATETIME No false \N REPLACE -datetimev2_value_1_min DATETIME No false \N MIN -datetimev2_value_2_max DATETIME(3) No false \N MAX -datetimev2_value_2_replace DATETIME(3) No false \N REPLACE -datetimev2_value_2_min DATETIME(3) No false \N MIN -datetimev2_value_3_max DATETIME(6) No false \N MAX -datetimev2_value_3_replace DATETIME(6) No false \N REPLACE -datetimev2_value_3_min DATETIME(6) No false \N MIN -float_value FLOAT No false \N SUM -double_value DOUBLE No false \N SUM +tinyint_key tinyint No true \N +smallint_key smallint No true \N BLOOM_FILTER +int_key int No true \N BLOOM_FILTER +bigint_key bigint No true \N BLOOM_FILTER +char_50_key char(50) No true \N BLOOM_FILTER +character_key varchar(500) No true \N BLOOM_FILTER +char_key char(1) No true \N BLOOM_FILTER +character_most_key varchar(65533) No true \N BLOOM_FILTER +decimal_key decimal(20, 6) No true \N BLOOM_FILTER +decimal_most_key decimal(27, 9) No true \N BLOOM_FILTER +decimal32_key decimal(5, 1) No true \N BLOOM_FILTER +decimal64_key decimal(14, 1) No true \N BLOOM_FILTER +decimal128_key decimal(38, 1) No true \N BLOOM_FILTER +date_key date No true \N BLOOM_FILTER +datetime_key datetime No true \N BLOOM_FILTER +datev2_key date No true \N BLOOM_FILTER +datetimev2_key_1 datetime No true \N BLOOM_FILTER +datetimev2_key_2 datetime(3) No true \N BLOOM_FILTER +datetimev2_key_3 datetime(6) No true \N BLOOM_FILTER +tinyint_value tinyint No false \N SUM +smallint_value smallint No false \N SUM +int_value int No false \N SUM +bigint_value bigint No false \N SUM +char_50_value char(50) No false \N REPLACE +character_value varchar(500) No false \N REPLACE +char_value char(1) No false \N REPLACE +character_most_value varchar(65533) No false \N REPLACE +decimal_value decimal(20, 6) No false \N SUM +decimal_most_value decimal(27, 9) No false \N SUM +decimal32_value decimal(5, 1) No false \N SUM +decimal64_value decimal(14, 1) No false \N SUM +decimal128_value decimal(38, 1) No false \N SUM +date_value_max date No false \N MAX +date_value_replace date No false \N REPLACE +date_value_min date No false \N MIN +datetime_value_max datetime No false \N MAX +datetime_value_replace datetime No false \N REPLACE +datetime_value_min datetime No false \N MIN +datev2_value_max date No false \N MAX +datev2_value_replace date No false \N REPLACE +datev2_value_min date No false \N MIN +datetimev2_value_1_max datetime No false \N MAX +datetimev2_value_1_replace datetime No false \N REPLACE +datetimev2_value_1_min datetime No false \N MIN +datetimev2_value_2_max datetime(3) No false \N MAX +datetimev2_value_2_replace datetime(3) No false \N REPLACE +datetimev2_value_2_min datetime(3) No false \N MIN +datetimev2_value_3_max datetime(6) No false \N MAX +datetimev2_value_3_replace datetime(6) No false \N REPLACE +datetimev2_value_3_min datetime(6) No false \N MIN +float_value float No false \N SUM +double_value double No false \N SUM diff --git a/regression-test/data/correctness/test_view_varchar_length.out b/regression-test/data/correctness/test_view_varchar_length.out index 2b67988f7fd852..e53fe9ff97fe63 100644 --- a/regression-test/data/correctness/test_view_varchar_length.out +++ b/regression-test/data/correctness/test_view_varchar_length.out @@ -1,4 +1,4 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !sql -- -name VARCHAR(32) No false \N +name varchar(32) No false \N diff --git a/regression-test/data/data_model_p0/aggregate/test_aggregate_table.out b/regression-test/data/data_model_p0/aggregate/test_aggregate_table.out index d147f656433df5..1a7ed71eb2e57c 100644 --- a/regression-test/data/data_model_p0/aggregate/test_aggregate_table.out +++ b/regression-test/data/data_model_p0/aggregate/test_aggregate_table.out @@ -3,46 +3,46 @@ 0 3 2 1 \N 2 -- !desc_date_table -- -k INT Yes true \N -int_value_sum INT Yes false \N SUM -int_value_max INT Yes false \N MAX -int_value_min INT Yes false \N MIN -int_value_replace INT Yes false \N REPLACE -int_value_replace_if_not_null INT Yes false \N REPLACE_IF_NOT_NULL +k int Yes true \N +int_value_sum int Yes false \N SUM +int_value_max int Yes false \N MAX +int_value_min int Yes false \N MIN +int_value_replace int Yes false \N REPLACE +int_value_replace_if_not_null int Yes false \N REPLACE_IF_NOT_NULL -- !string_agg_table -- 0 2 \N -- !desc_string_table -- -k INT Yes true \N -char_value_max CHAR(10) Yes false \N MAX -char_value_min CHAR(10) Yes false \N MIN -char_value_replace CHAR(10) Yes false \N REPLACE -char_value_replace_if_not_null CHAR(10) Yes false \N REPLACE_IF_NOT_NULL +k int Yes true \N +char_value_max char(10) Yes false \N MAX +char_value_min char(10) Yes false \N MIN +char_value_replace char(10) Yes false \N REPLACE +char_value_replace_if_not_null char(10) Yes false \N REPLACE_IF_NOT_NULL -- !date_agg_table -- 0 2000-12-31 2000-01-01 \N 2000-12-31 2000-12-31 2000-01-01 \N 2000-12-31 2000-12-31T11:11:11 2000-01-01T11:11:11 \N 2000-12-31T11:11:11 2000-12-31T11:11:11.111 2000-01-01T11:11:11.111 \N 2000-12-31T11:11:11.111 2000-12-31T11:11:11.111111 2000-01-01T11:11:11.111111 \N 2000-12-31T11:11:11.111111 -- !desc_date_table -- -k INT Yes true \N -date_value_max DATE Yes false \N MAX -date_value_min DATE Yes false \N MIN -date_value_replace DATE Yes false \N REPLACE -date_value_replace_if_not_null DATE Yes false \N REPLACE_IF_NOT_NULL -datev2_value_max DATE Yes false \N MAX -datev2_value_min DATE Yes false \N MIN -datev2_value_replace DATE Yes false \N REPLACE -datev2_value_replace_if_not_null DATE Yes false \N REPLACE_IF_NOT_NULL -datetimev2_value_max DATETIME Yes false \N MAX -datetimev2_value_min DATETIME Yes false \N MIN -datetimev2_value_replace DATETIME Yes false \N REPLACE -datetimev2_value_replace_if_not_null DATETIME Yes false \N REPLACE_IF_NOT_NULL -datetimev2_value_max_1 DATETIME(3) Yes false \N MAX -datetimev2_value_min_1 DATETIME(3) Yes false \N MIN -datetimev2_value_replace_1 DATETIME(3) Yes false \N REPLACE -datetimev2_value_replace_if_not_null_1 DATETIME(3) Yes false \N REPLACE_IF_NOT_NULL -datetimev2_value_max_2 DATETIME(6) Yes false \N MAX -datetimev2_value_min_2 DATETIME(6) Yes false \N MIN -datetimev2_value_replace_2 DATETIME(6) Yes false \N REPLACE -datetimev2_value_replace_if_not_null_2 DATETIME(6) Yes false \N REPLACE_IF_NOT_NULL +k int Yes true \N +date_value_max date Yes false \N MAX +date_value_min date Yes false \N MIN +date_value_replace date Yes false \N REPLACE +date_value_replace_if_not_null date Yes false \N REPLACE_IF_NOT_NULL +datev2_value_max date Yes false \N MAX +datev2_value_min date Yes false \N MIN +datev2_value_replace date Yes false \N REPLACE +datev2_value_replace_if_not_null date Yes false \N REPLACE_IF_NOT_NULL +datetimev2_value_max datetime Yes false \N MAX +datetimev2_value_min datetime Yes false \N MIN +datetimev2_value_replace datetime Yes false \N REPLACE +datetimev2_value_replace_if_not_null datetime Yes false \N REPLACE_IF_NOT_NULL +datetimev2_value_max_1 datetime(3) Yes false \N MAX +datetimev2_value_min_1 datetime(3) Yes false \N MIN +datetimev2_value_replace_1 datetime(3) Yes false \N REPLACE +datetimev2_value_replace_if_not_null_1 datetime(3) Yes false \N REPLACE_IF_NOT_NULL +datetimev2_value_max_2 datetime(6) Yes false \N MAX +datetimev2_value_min_2 datetime(6) Yes false \N MIN +datetimev2_value_replace_2 datetime(6) Yes false \N REPLACE +datetimev2_value_replace_if_not_null_2 datetime(6) Yes false \N REPLACE_IF_NOT_NULL diff --git a/regression-test/data/data_model_p0/duplicate/test_duplicate_table.out b/regression-test/data/data_model_p0/duplicate/test_duplicate_table.out index ca53c5f958dfa6..a2023bbb3b79e9 100644 --- a/regression-test/data/data_model_p0/duplicate/test_duplicate_table.out +++ b/regression-test/data/data_model_p0/duplicate/test_duplicate_table.out @@ -5,14 +5,14 @@ 0 2 test int 2000-02-02 2000-02-02 2000-02-02T11:00:11 2000-02-02T11:00:11.111 2000-02-02T11:00:11.111111 -- !desc_dup_table -- -k INT Yes true \N -int_value INT Yes false \N NONE -char_value CHAR(10) Yes false \N NONE -date_value DATE Yes false \N NONE -date_value2 DATE Yes false \N NONE -date_value3 DATETIME Yes false \N NONE -date_value4 DATETIME(3) Yes false \N NONE -date_value5 DATETIME(6) Yes false \N NONE +k int Yes true \N +int_value int Yes false \N NONE +char_value char(10) Yes false \N NONE +date_value date Yes false \N NONE +date_value2 date Yes false \N NONE +date_value3 datetime Yes false \N NONE +date_value4 datetime(3) Yes false \N NONE +date_value5 datetime(6) Yes false \N NONE -- !select_dup_table -- 0 1 2 3 @@ -20,8 +20,8 @@ date_value5 DATETIME(6) Yes false \N NONE 0 1 2 5 -- !desc_dup_table -- -k1 INT Yes true \N -k2 INT Yes true \N -k3 INT Yes true \N -int_value INT Yes false \N NONE +k1 int Yes true \N +k2 int Yes true \N +k3 int Yes true \N +int_value int Yes false \N NONE diff --git a/regression-test/data/data_model_p0/duplicate/test_duplicate_table_without_keys.out b/regression-test/data/data_model_p0/duplicate/test_duplicate_table_without_keys.out index 3ff8e0394afb35..25e83d20671b1c 100644 --- a/regression-test/data/data_model_p0/duplicate/test_duplicate_table_without_keys.out +++ b/regression-test/data/data_model_p0/duplicate/test_duplicate_table_without_keys.out @@ -5,10 +5,10 @@ 0 1 2 5 -- !desc_dup_table -- -k1 INT Yes true \N -k2 INT Yes true \N -k3 INT Yes true \N -int_value INT Yes false \N NONE +k1 int Yes true \N +k2 int Yes true \N +k3 int Yes true \N +int_value int Yes false \N NONE -- !select_dup_table -- 0 1 2 3 @@ -16,10 +16,10 @@ int_value INT Yes false \N NONE 0 1 2 5 -- !desc_dup_table -- -k1 INT Yes false \N NONE -k2 INT Yes false \N NONE -k3 INT Yes false \N NONE -int_value INT Yes false \N NONE +k1 int Yes false \N NONE +k2 int Yes false \N NONE +k3 int Yes false \N NONE +int_value int Yes false \N NONE -- !select_dup_table -- 0 1 2 0 3 @@ -27,16 +27,16 @@ int_value INT Yes false \N NONE 0 1 2 0 5 -- !desc_dup_table -- -k1 INT Yes false \N NONE -k2 INT Yes false \N NONE -k3 INT Yes false \N NONE -new_col1 INT Yes false 0 NONE -int_value INT Yes false \N NONE +k1 int Yes false \N NONE +k2 int Yes false \N NONE +k3 int Yes false \N NONE +new_col1 int Yes false 0 NONE +int_value int Yes false \N NONE -- !desc_dup_table -- -k1 INT Yes false \N NONE -k2 INT Yes false \N NONE -k3 INT Yes false \N NONE -new_col1 INT Yes false 0 NONE -int_value INT Yes false \N NONE +k1 int Yes false \N NONE +k2 int Yes false \N NONE +k3 int Yes false \N NONE +new_col1 int Yes false 0 NONE +int_value int Yes false \N NONE diff --git a/regression-test/data/data_model_p0/unique/test_unique_table.out b/regression-test/data/data_model_p0/unique/test_unique_table.out index 6e4a7ec0e76752..e8652459d657fe 100644 --- a/regression-test/data/data_model_p0/unique/test_unique_table.out +++ b/regression-test/data/data_model_p0/unique/test_unique_table.out @@ -3,19 +3,19 @@ 0 \N \N \N -- !desc_uniq_table -- -k INT Yes true \N -int_value INT Yes false \N REPLACE -char_value CHAR(10) Yes false \N REPLACE -date_value DATE Yes false \N REPLACE +k int Yes true \N +int_value int Yes false \N REPLACE +char_value char(10) Yes false \N REPLACE +date_value date Yes false \N REPLACE -- !0 -- -k1 INT Yes true \N -v1 TINYINT Yes false \N REPLACE -v2 INT Yes false \N REPLACE -v3 INT Yes false \N REPLACE -or INT Yes false \N REPLACE -__DORIS_DELETE_SIGN__ TINYINT No false 0 REPLACE -__DORIS_VERSION_COL__ BIGINT No false 0 REPLACE +k1 int Yes true \N +v1 tinyint Yes false \N REPLACE +v2 int Yes false \N REPLACE +v3 int Yes false \N REPLACE +or int Yes false \N REPLACE +__DORIS_DELETE_SIGN__ tinyint No false 0 REPLACE +__DORIS_VERSION_COL__ bigint No false 0 REPLACE -- !1 -- 1 1 1 1 1 0 2 diff --git a/regression-test/data/data_model_p0/unique/test_unique_table_like.out b/regression-test/data/data_model_p0/unique/test_unique_table_like.out index dd68e453ff1b3f..72e3cfd50253a2 100644 --- a/regression-test/data/data_model_p0/unique/test_unique_table_like.out +++ b/regression-test/data/data_model_p0/unique/test_unique_table_like.out @@ -1,19 +1,19 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !desc_uniq_table -- -k INT Yes true \N -int_value INT Yes false \N REPLACE -char_value CHAR(10) Yes false \N REPLACE -date_value DATE Yes false \N REPLACE -__DORIS_DELETE_SIGN__ TINYINT No false 0 REPLACE -__DORIS_VERSION_COL__ BIGINT No false 0 REPLACE -__DORIS_SEQUENCE_COL__ INT Yes false \N REPLACE +k int Yes true \N +int_value int Yes false \N REPLACE +char_value char(10) Yes false \N REPLACE +date_value date Yes false \N REPLACE +__DORIS_DELETE_SIGN__ tinyint No false 0 REPLACE +__DORIS_VERSION_COL__ bigint No false 0 REPLACE +__DORIS_SEQUENCE_COL__ int Yes false \N REPLACE -- !desc_uniq_table -- -k INT Yes true \N -int_value INT Yes false \N REPLACE -char_value CHAR(10) Yes false \N REPLACE -date_value DATE Yes false \N REPLACE -__DORIS_DELETE_SIGN__ TINYINT No false 0 REPLACE -__DORIS_VERSION_COL__ BIGINT No false 0 REPLACE -__DORIS_SEQUENCE_COL__ INT Yes false \N REPLACE +k int Yes true \N +int_value int Yes false \N REPLACE +char_value char(10) Yes false \N REPLACE +date_value date Yes false \N REPLACE +__DORIS_DELETE_SIGN__ tinyint No false 0 REPLACE +__DORIS_VERSION_COL__ bigint No false 0 REPLACE +__DORIS_SEQUENCE_COL__ int Yes false \N REPLACE diff --git a/regression-test/data/data_model_p0/unique/test_unique_table_new_sequence.out b/regression-test/data/data_model_p0/unique/test_unique_table_new_sequence.out index c8acc992a0c6cf..1279af9294f41e 100644 --- a/regression-test/data/data_model_p0/unique/test_unique_table_new_sequence.out +++ b/regression-test/data/data_model_p0/unique/test_unique_table_new_sequence.out @@ -46,14 +46,14 @@ 3 6 13 14 15 0 2 13 -- !desc -- -k1 INT Yes true \N -v1 TINYINT Yes false \N REPLACE -v2 INT Yes false \N REPLACE -v3 INT Yes false \N REPLACE -v4 INT Yes false \N REPLACE -__DORIS_DELETE_SIGN__ TINYINT No false 0 REPLACE -__DORIS_VERSION_COL__ BIGINT No false 0 REPLACE -__DORIS_SEQUENCE_COL__ INT Yes false \N REPLACE +k1 int Yes true \N +v1 tinyint Yes false \N REPLACE +v2 int Yes false \N REPLACE +v3 int Yes false \N REPLACE +v4 int Yes false \N REPLACE +__DORIS_DELETE_SIGN__ tinyint No false 0 REPLACE +__DORIS_VERSION_COL__ bigint No false 0 REPLACE +__DORIS_SEQUENCE_COL__ int Yes false \N REPLACE -- !1 -- 1 1 1 1 1 0 2 1 diff --git a/regression-test/data/datatype_p0/bitmap/test_bitmap_int.out b/regression-test/data/datatype_p0/bitmap/test_bitmap_int.out index 3ff7233cef75a5967010703add45a477054e6a8d..30f8ec06e76cc97f7357b252986bf6fe8deb99d8 100644 GIT binary patch delta 44 vcmcb|bdPDmCZ){063)ofV$PDH(p1hEKTfWs%#z&1g81Up5>5zn;*~A{Z^;nW delta 44 zcmcb|bdPDmCM8e55YEWdV$PDH(p1hEKTfWs%#z&1g81Up5>6-25MRfDiC4M+U1<-t 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 008e485e4b5f43..6c49a4f011f23b 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 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 decimalv3(9,0) Yes false \N NONE true diff --git a/regression-test/data/datatype_p0/scalar_types/get_assignment_compatible_type.out b/regression-test/data/datatype_p0/scalar_types/get_assignment_compatible_type.out index 68324f43da7c43..60e4d6fc604110 100644 --- a/regression-test/data/datatype_p0/scalar_types/get_assignment_compatible_type.out +++ b/regression-test/data/datatype_p0/scalar_types/get_assignment_compatible_type.out @@ -1,6 +1,6 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !test_sql -- -test_decimal_boolean_view CREATE VIEW `test_decimal_boolean_view` AS SELECT `id` AS `id`, `c1` AS `c1`, `c2` AS `c2` FROM `default_cluster:regression_test_datatype_p0_scalar_types`.`test_decimal_boolean` WHERE 0.0 = CAST(`c1` AS DECIMALV3(2, 1)) AND CAST(`c2` AS DECIMALV3(6, 1)) = 1.0; utf8 utf8_general_ci +test_decimal_boolean_view CREATE VIEW `test_decimal_boolean_view` AS SELECT `id` AS `id`, `c1` AS `c1`, `c2` AS `c2` FROM `default_cluster:regression_test_datatype_p0_scalar_types`.`test_decimal_boolean` WHERE 0.0 = CAST(`c1` AS decimalv3(2,1)) AND CAST(`c2` AS decimalv3(6,1)) = 1.0; utf8 utf8_general_ci -- !test_union -- 0.0 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 cad1ae0a55374d..13e0cf1d150522 100644 --- a/regression-test/data/ddl_p0/test_create_table_like.out +++ b/regression-test/data/ddl_p0/test_create_table_like.out @@ -1,21 +1,21 @@ -- 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 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 -- !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 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 -- !select_table_like -- test1 1 123456789 1234567891 123456789.0 1234567891 123456789.0 diff --git a/regression-test/data/external_table_p0/hive/test_hive_basic_type.out b/regression-test/data/external_table_p0/hive/test_hive_basic_type.out index 774bc3d24c11d4..a01ad1fea7620c 100644 --- a/regression-test/data/external_table_p0/hive/test_hive_basic_type.out +++ b/regression-test/data/external_table_p0/hive/test_hive_basic_type.out @@ -104,7 +104,7 @@ true 8 8 8 80 8.8 80.8 7298 12/31/10 8 2010-12-31T12:08:13.780 2010 12 -- !26 -- -- !27 -- -test DATETIME(6) Yes true \N +test datetime(6) Yes true \N -- !28 -- \N @@ -114,7 +114,7 @@ test DATETIME(6) Yes true \N 2023-04-20T15:51:49 -- !29 -- -test DATETIME(6) Yes true \N +test datetime(6) Yes true \N -- !30 -- \N @@ -124,7 +124,7 @@ test DATETIME(6) Yes true \N 2023-04-20T15:51:49 -- !31 -- -test DATETIME(6) Yes true \N +test datetime(6) Yes true \N -- !32 -- \N @@ -367,7 +367,7 @@ true 8 8 8 80 8.8 80.8 7298 12/31/10 8 2010-12-31T12:08:13.780 2010 12 -- !26 -- -- !27 -- -test DATETIME(6) Yes true \N +test datetime(6) Yes true \N -- !28 -- \N @@ -377,7 +377,7 @@ test DATETIME(6) Yes true \N 2023-04-20T15:51:49 -- !29 -- -test DATETIME(6) Yes true \N +test datetime(6) Yes true \N -- !30 -- \N @@ -387,7 +387,7 @@ test DATETIME(6) Yes true \N 2023-04-20T15:51:49 -- !31 -- -test DATETIME(6) Yes true \N +test datetime(6) Yes true \N -- !32 -- \N @@ -524,3 +524,4 @@ true 123.456 123.456 123.456 + diff --git a/regression-test/data/external_table_p0/hive/test_hive_struct_add_column.out b/regression-test/data/external_table_p0/hive/test_hive_struct_add_column.out index a87aab2d81deda..e9aca6dafc3cd4 100644 --- a/regression-test/data/external_table_p0/hive/test_hive_struct_add_column.out +++ b/regression-test/data/external_table_p0/hive/test_hive_struct_add_column.out @@ -1,10 +1,10 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !desc -- -id INT Yes true \N -name TEXT Yes true \N -details STRUCT Yes true \N -sex INT Yes true \N -complex ARRAY>> Yes true \N +id int Yes true \N +name text Yes true \N +details struct Yes true \N +sex int Yes true \N +complex array>> Yes true \N -- !test_1 -- 1 Alice {"age": 25, "city": "New York", "email": null, "phone": null} \N \N diff --git a/regression-test/data/external_table_p0/jdbc/test_doris_jdbc_catalog.out b/regression-test/data/external_table_p0/jdbc/test_doris_jdbc_catalog.out index 211b33a07d082c..0fafd18e6de36b 100644 --- a/regression-test/data/external_table_p0/jdbc/test_doris_jdbc_catalog.out +++ b/regression-test/data/external_table_p0/jdbc/test_doris_jdbc_catalog.out @@ -72,39 +72,39 @@ true 1 1 1 1 1 1.0 1.0 1.00000 1.0000000000 2021-01-01 2021-01-01T00:00 a a {"a" 2 -- !desc_ctas_base -- -bool_col BOOLEAN Yes true \N -tinyint_col TINYINT Yes true \N -smallint_col SMALLINT Yes true \N -int_col INT Yes false \N NONE -bigint_col BIGINT Yes false \N NONE -largeint_col LARGEINT Yes false \N NONE -float_col FLOAT Yes false \N NONE -double_col DOUBLE Yes false \N NONE -decimal_col DECIMAL(10, 5) Yes false \N NONE -decimal_col2 DECIMAL(30, 10) Yes false \N NONE -date_col DATE Yes false \N NONE -datetime_col DATETIME(3) Yes false \N NONE -char_col TEXT Yes false \N NONE -varchar_col TEXT Yes false \N NONE -json_col JSON Yes false \N NONE +bool_col boolean Yes true \N +tinyint_col tinyint Yes true \N +smallint_col smallint Yes true \N +int_col int Yes false \N NONE +bigint_col bigint Yes false \N NONE +largeint_col largeint Yes false \N NONE +float_col float Yes false \N NONE +double_col double Yes false \N NONE +decimal_col decimal(10, 5) Yes false \N NONE +decimal_col2 decimal(30, 10) Yes false \N NONE +date_col date Yes false \N NONE +datetime_col datetime(3) Yes false \N NONE +char_col text Yes false \N NONE +varchar_col text Yes false \N NONE +json_col json Yes false \N NONE -- !desc_ctas_arr -- -int_col INT Yes true \N -arr_bool_col ARRAY Yes false \N NONE -arr_tinyint_col ARRAY Yes false \N NONE -arr_smallint_col ARRAY Yes false \N NONE -arr_int_col ARRAY Yes false \N NONE -arr_bigint_col ARRAY Yes false \N NONE -arr_largeint_col ARRAY Yes false \N NONE -arr_float_col ARRAY Yes false \N NONE -arr_double_col ARRAY Yes false \N NONE -arr_decimal1_col ARRAY Yes false \N NONE -arr_decimal2_col ARRAY Yes false \N NONE -arr_date_col ARRAY Yes false \N NONE -arr_datetime_col ARRAY Yes false \N NONE -arr_char_col ARRAY Yes false \N NONE -arr_varchar_col ARRAY Yes false \N NONE -arr_string_col ARRAY Yes false \N NONE +int_col int Yes true \N +arr_bool_col array Yes false \N NONE +arr_tinyint_col array Yes false \N NONE +arr_smallint_col array Yes false \N NONE +arr_int_col array Yes false \N NONE +arr_bigint_col array Yes false \N NONE +arr_largeint_col array Yes false \N NONE +arr_float_col array Yes false \N NONE +arr_double_col array Yes false \N NONE +arr_decimal1_col array Yes false \N NONE +arr_decimal2_col array Yes false \N NONE +arr_date_col array Yes false \N NONE +arr_datetime_col array Yes false \N NONE +arr_char_col array Yes false \N NONE +arr_varchar_col array Yes false \N NONE +arr_string_col array Yes false \N NONE -- !query_ctas_base -- \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N diff --git a/regression-test/data/external_table_p0/jdbc/test_mysql_jdbc_catalog.out b/regression-test/data/external_table_p0/jdbc/test_mysql_jdbc_catalog.out index ec726fddc105c8..4da75c92e6f785 100644 --- a/regression-test/data/external_table_p0/jdbc/test_mysql_jdbc_catalog.out +++ b/regression-test/data/external_table_p0/jdbc/test_mysql_jdbc_catalog.out @@ -337,38 +337,38 @@ sys 203 303 403 503 603 7.14159 8.1415926 9.14159 0 \N -402 2017 -602 -902 -1102 2012-11-02 \N 2013-10-27T08:11:18 -5.14145 -6.1400000000001 -7.1400 row3 line3 09:11:09.567 text3 0xE86F6C6C6F20576F726C67 {"age":24,"city":"ChongQing","name":"ChenQi"} Option2 0x2F 0x58676C6C6F00000000000000 \N Value1 -- !ctas_desc -- -bigint BIGINT Yes false \N NONE -bigint_u LARGEINT Yes false \N NONE -binary TEXT Yes false \N NONE -bit TEXT Yes false \N NONE -blob TEXT Yes false \N NONE -boolean TINYINT Yes false \N NONE -char TEXT Yes false \N NONE -date DATE Yes false \N NONE -datetime DATETIME Yes false \N NONE -decimal DECIMAL(12, 4) Yes false \N NONE -decimal_u DECIMAL(19, 5) Yes false \N NONE -double DOUBLE Yes false \N NONE -double_u DOUBLE Yes false \N NONE -enum TEXT Yes false \N NONE -float FLOAT Yes false \N NONE -float_u FLOAT Yes false \N NONE -int INT Yes false \N NONE -int_u BIGINT Yes false \N NONE -json JSON Yes false \N NONE -mediumint INT Yes false \N NONE -mediumint_u INT Yes true \N -set TEXT Yes false \N NONE -smallint SMALLINT Yes false \N NONE -smallint_u INT Yes true \N -text TEXT Yes false \N NONE -time TEXT Yes false \N NONE -timestamp DATETIME(4) Yes false \N NONE -tinyint TINYINT Yes false \N NONE -tinyint_u SMALLINT Yes true \N -varbinary TEXT Yes false \N NONE -varchar TEXT Yes false \N NONE -year SMALLINT Yes false \N NONE +bigint bigint Yes false \N NONE +bigint_u largeint Yes false \N NONE +binary text Yes false \N NONE +bit text Yes false \N NONE +blob text Yes false \N NONE +boolean tinyint Yes false \N NONE +char text Yes false \N NONE +date date Yes false \N NONE +datetime datetime Yes false \N NONE +decimal decimal(12, 4) Yes false \N NONE +decimal_u decimal(19, 5) Yes false \N NONE +double double Yes false \N NONE +double_u double Yes false \N NONE +enum text Yes false \N NONE +float float Yes false \N NONE +float_u float Yes false \N NONE +int int Yes false \N NONE +int_u bigint Yes false \N NONE +json json Yes false \N NONE +mediumint int Yes false \N NONE +mediumint_u int Yes true \N +set text Yes false \N NONE +smallint smallint Yes false \N NONE +smallint_u int Yes true \N +text text Yes false \N NONE +time text Yes false \N NONE +timestamp datetime(4) Yes false \N NONE +tinyint tinyint Yes false \N NONE +tinyint_u smallint Yes true \N +varbinary text Yes false \N NONE +varchar text Yes false \N NONE +year smallint Yes false \N NONE -- !mysql_view -- 10086 4294967295 201 @@ -449,3 +449,4 @@ year SMALLINT Yes false \N NONE -- !auto_default_t2 -- 0 + diff --git a/regression-test/data/external_table_p0/jdbc/test_oracle_jdbc_catalog.out b/regression-test/data/external_table_p0/jdbc/test_oracle_jdbc_catalog.out index ac1a6907f45435..4adc3483644851 100644 --- a/regression-test/data/external_table_p0/jdbc/test_oracle_jdbc_catalog.out +++ b/regression-test/data/external_table_p0/jdbc/test_oracle_jdbc_catalog.out @@ -174,39 +174,39 @@ doris3 20 2 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N -- !ctas_desc -- -ADDRESS TEXT Yes false \N NONE -BIGINT_VALUE1 BIGINT Yes false \N NONE -BIGINT_VALUE2 LARGEINT Yes false \N NONE -CITY TEXT Yes false \N NONE -COUNTRY TEXT Yes false \N NONE -ID LARGEINT Yes true \N -INT_VALUE1 INT Yes false \N NONE -INT_VALUE2 BIGINT Yes false \N NONE -N1 TEXT Yes false \N NONE -N2 LARGEINT Yes false \N NONE -N3 DECIMAL Yes false \N NONE -N4 LARGEINT Yes false \N NONE -N5 LARGEINT Yes false \N NONE -N6 DECIMAL(5, 2) Yes false \N NONE -N7 DOUBLE Yes false \N NONE -N8 DOUBLE Yes false \N NONE -N9 DOUBLE Yes false \N NONE -NAME TEXT Yes false \N NONE -NUM1 DECIMAL(5, 2) Yes false \N NONE -NUM2 INT Yes false \N NONE -NUM4 DECIMAL(7, 7) Yes false \N NONE -REMARK TEXT Yes false \N NONE -SMALLINT_VALUE1 SMALLINT Yes false \N NONE -SMALLINT_VALUE2 INT Yes false \N NONE -T1 DATETIME Yes false \N NONE -T2 DATETIME(3) Yes false \N NONE -T3 DATETIME(6) Yes false \N NONE -T4 DATETIME(6) Yes false \N NONE -T5 DATETIME(6) Yes false \N NONE -T6 TEXT Yes false \N NONE -T7 TEXT Yes false \N NONE -TINYINT_VALUE1 TINYINT Yes false \N NONE -TINYINT_VALUE2 SMALLINT Yes false \N NONE +ADDRESS text Yes false \N NONE +BIGINT_VALUE1 bigint Yes false \N NONE +BIGINT_VALUE2 largeint Yes false \N NONE +CITY text Yes false \N NONE +COUNTRY text Yes false \N NONE +ID largeint Yes true \N +INT_VALUE1 int Yes false \N NONE +INT_VALUE2 bigint Yes false \N NONE +N1 text Yes false \N NONE +N2 largeint Yes false \N NONE +N3 decimal Yes false \N NONE +N4 largeint Yes false \N NONE +N5 largeint Yes false \N NONE +N6 decimal(5, 2) Yes false \N NONE +N7 double Yes false \N NONE +N8 double Yes false \N NONE +N9 double Yes false \N NONE +NAME text Yes false \N NONE +NUM1 decimal(5, 2) Yes false \N NONE +NUM2 int Yes false \N NONE +NUM4 decimal(7, 7) Yes false \N NONE +REMARK text Yes false \N NONE +SMALLINT_VALUE1 smallint Yes false \N NONE +SMALLINT_VALUE2 int Yes false \N NONE +T1 datetime Yes false \N NONE +T2 datetime(3) Yes false \N NONE +T3 datetime(6) Yes false \N NONE +T4 datetime(6) Yes false \N NONE +T5 datetime(6) Yes false \N NONE +T6 text Yes false \N NONE +T7 text Yes false \N NONE +TINYINT_VALUE1 tinyint Yes false \N NONE +TINYINT_VALUE2 smallint Yes false \N NONE -- !select_insert_all_types -- 1 111 123 7456123.89 573 34 673.43 34.1264 60.0 23.231 99 9999 999999999 999999999999999999 999 99999 9999999999 9999999999999999999 1 china beijing alice abcdefghrjkmnopq 123.45 12300 0.0012345 2022-01-21T05:23:01 2019-11-12T20:33:57.999 2019-11-12T20:33:57.999998 2019-11-12T20:33:57.999996 2019-11-12T20:33:57.999997 223-9 12 10:23:1.123457 diff --git a/regression-test/data/external_table_p0/jdbc/test_pg_jdbc_catalog.out b/regression-test/data/external_table_p0/jdbc/test_pg_jdbc_catalog.out index adb337bedd127b..2d717cf345305d 100644 --- a/regression-test/data/external_table_p0/jdbc/test_pg_jdbc_catalog.out +++ b/regression-test/data/external_table_p0/jdbc/test_pg_jdbc_catalog.out @@ -2234,31 +2234,31 @@ doris3 20 2 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N 2 \N \N \N \N \N \N \N \N -- !ctas_desc -- -bigint_value BIGINT Yes false \N NONE -bit_value BOOLEAN Yes false \N NONE -bitn_value TEXT Yes false \N NONE -bitnv_value TEXT Yes false \N NONE -box_value TEXT Yes false \N NONE -char_value TEXT Yes false \N NONE -cidr_value TEXT Yes false \N NONE -circle_value TEXT Yes false \N NONE -date_value DATE Yes false \N NONE -decimal_value DECIMAL(10, 3) Yes false \N NONE -id INT No true \N -inet_value TEXT Yes false \N NONE -int_value INT Yes false \N NONE -jsonb_value JSON Yes false \N NONE -line_value TEXT Yes false \N NONE -lseg_value TEXT Yes false \N NONE -macaddr_value TEXT Yes false \N NONE -path_value TEXT Yes false \N NONE -point_value TEXT Yes false \N NONE -polygon_value TEXT Yes false \N NONE -real_value FLOAT Yes false \N NONE -serial4_value INT No false \N NONE -smallint_value SMALLINT Yes false \N NONE -timestamp_value DATETIME(6) Yes false \N NONE -varchar_value TEXT Yes false \N NONE +bigint_value bigint Yes false \N NONE +bit_value boolean Yes false \N NONE +bitn_value text Yes false \N NONE +bitnv_value text Yes false \N NONE +box_value text Yes false \N NONE +char_value text Yes false \N NONE +cidr_value text Yes false \N NONE +circle_value text Yes false \N NONE +date_value date Yes false \N NONE +decimal_value decimal(10, 3) Yes false \N NONE +id int No true \N +inet_value text Yes false \N NONE +int_value int Yes false \N NONE +jsonb_value json Yes false \N NONE +line_value text Yes false \N NONE +lseg_value text Yes false \N NONE +macaddr_value text Yes false \N NONE +path_value text Yes false \N NONE +point_value text Yes false \N NONE +polygon_value text Yes false \N NONE +real_value float Yes false \N NONE +serial4_value int No false \N NONE +smallint_value smallint Yes false \N NONE +timestamp_value datetime(6) Yes false \N NONE +varchar_value text Yes false \N NONE -- !select_insert_all_types -- 1 abc def 2022-10-11 1 2 3 2022-10-22T10:59:59 34.123 false 12.123456 10.16.10.14/32 10.16.10.14 ff:ff:ff:ff:ff:aa 1010101010 01010 1 {"id":1} (1.0,1.0) {1.0,1.0,1.0} [(1.0,1.0),(2.0,2.0)] (2.0,2.0),(1.0,1.0) ((1.0,1.0),(2.0,2.0),(2.0,1.0)) ((1.0,1.0),(2.0,2.0),(2.0,1.0)) <(0.0,0.0),1.0> diff --git a/regression-test/data/external_table_p0/jdbc/test_sqlserver_jdbc_catalog.out b/regression-test/data/external_table_p0/jdbc/test_sqlserver_jdbc_catalog.out index d7c15da2c7fdc0..d55491bebb8a2c 100644 --- a/regression-test/data/external_table_p0/jdbc/test_sqlserver_jdbc_catalog.out +++ b/regression-test/data/external_table_p0/jdbc/test_sqlserver_jdbc_catalog.out @@ -72,44 +72,44 @@ 2 -- !desc_query_ctas -- -id INT No true \N -name TEXT Yes false \N NONE -age INT Yes false \N NONE -tinyint_value SMALLINT Yes false \N NONE -smallint_value SMALLINT Yes false \N NONE -bigint_value BIGINT Yes false \N NONE -real_value FLOAT Yes false \N NONE -float_value DOUBLE Yes false \N NONE -floatn_value FLOAT Yes false \N NONE -decimal_value DECIMAL Yes false \N NONE -numeric_value DECIMAL Yes false \N NONE -decimal_value2 DECIMAL(38, 10) Yes false \N NONE -numeric_value2 DECIMAL(38, 10) Yes false \N NONE -char_value TEXT Yes false \N NONE -varchar_value TEXT Yes false \N NONE -varcharmax_value TEXT Yes false \N NONE -nchar_value TEXT Yes false \N NONE -nvarchar_value TEXT Yes false \N NONE -nvarcharmax_value TEXT Yes false \N NONE -date_value DATE Yes false \N NONE -time_value TEXT Yes false \N NONE -datetime_value DATETIME(3) Yes false \N NONE -datetime2_value DATETIME(6) Yes false \N NONE -smalldatetime_value DATETIME Yes false \N NONE -datetimeoffset_value TEXT Yes false \N NONE -text_value TEXT Yes false \N NONE -ntext_value TEXT Yes false \N NONE -money_value DECIMAL(19, 4) Yes false \N NONE -smallmoney_value DECIMAL(10, 4) Yes false \N NONE -bit_value BOOLEAN Yes false \N NONE +id int No true \N +name text Yes false \N NONE +age int Yes false \N NONE +tinyint_value smallint Yes false \N NONE +smallint_value smallint Yes false \N NONE +bigint_value bigint Yes false \N NONE +real_value float Yes false \N NONE +float_value double Yes false \N NONE +floatn_value float Yes false \N NONE +decimal_value decimal Yes false \N NONE +numeric_value decimal Yes false \N NONE +decimal_value2 decimal(38, 10) Yes false \N NONE +numeric_value2 decimal(38, 10) Yes false \N NONE +char_value text Yes false \N NONE +varchar_value text Yes false \N NONE +varcharmax_value text Yes false \N NONE +nchar_value text Yes false \N NONE +nvarchar_value text Yes false \N NONE +nvarcharmax_value text Yes false \N NONE +date_value date Yes false \N NONE +time_value text Yes false \N NONE +datetime_value datetime(3) Yes false \N NONE +datetime2_value datetime(6) Yes false \N NONE +smalldatetime_value datetime Yes false \N NONE +datetimeoffset_value text Yes false \N NONE +text_value text Yes false \N NONE +ntext_value text Yes false \N NONE +money_value decimal(19, 4) Yes false \N NONE +smallmoney_value decimal(10, 4) Yes false \N NONE +bit_value boolean Yes false \N NONE -- !query_ctas -- 1 doris 18 0 1 1 123.123 123.123 123.123 12345678901234567890123456789012345678 12345678901234567890123456789012345678 1234567890123456789012345678.0123456789 1234567890123456789012345678.0123456789 Make Doris Great! Make Doris Great! Make Doris Great! Make Doris Great! Make Doris Great! Make Doris Great! 2023-01-17 16:49:05.123 2023-01-17T16:49:05 2023-01-17T16:49:05.123456 2023-01-17T16:49 2023-01-17 16:49:05 +08:00 Make Doris Great! Make Doris Great! 922337203685477.5807 214748.3647 false 2 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N -- !desc_timestamp -- -id_col INT No true \N -timestamp_col TEXT Yes true \N +id_col int No true \N +timestamp_col text Yes true \N -- !query_timestamp -- 1 diff --git a/regression-test/data/external_table_p0/tvf/test_hdfs_tvf.out b/regression-test/data/external_table_p0/tvf/test_hdfs_tvf.out index 98a1324abd75f9..de4f8bd579c248 100644 --- a/regression-test/data/external_table_p0/tvf/test_hdfs_tvf.out +++ b/regression-test/data/external_table_p0/tvf/test_hdfs_tvf.out @@ -349,13 +349,13 @@ 5 guangzhou 2345675 -- !desc -- -s_suppkey INT Yes false \N NONE -s_name TEXT Yes false \N NONE -s_address TEXT Yes false \N NONE -s_nationkey INT Yes false \N NONE -s_phone TEXT Yes false \N NONE -s_acctbal DECIMAL(12, 2) Yes false \N NONE -s_comment TEXT Yes false \N NONE +s_suppkey int Yes false \N NONE +s_name text Yes false \N NONE +s_address text Yes false \N NONE +s_nationkey int Yes false \N NONE +s_phone text Yes false \N NONE +s_acctbal decimal(12,2) Yes false \N NONE +s_comment text Yes false \N NONE -- !hdfs_compatible -- 0 2 3 4 5 6.6 7.7 8.8 abc def ghiaaaaaa 2020-10-10 2020-10-10 11:12:59 @@ -602,17 +602,17 @@ s_comment TEXT Yes false \N NONE 99 2 3 4 5 6.6 7.7 8.80000 abc abc abc 2020-10-10 2020-10-10T11:12:59 -- !hdfs_desc_csv_schema -- -bigint_col BIGINT Yes false \N NONE -date_col DATE Yes false \N NONE -datetime_col DATETIME(3) Yes false \N NONE -decimal_col DECIMAL(10, 5) Yes false \N NONE -double_col DOUBLE Yes false \N NONE -float_col FLOAT Yes false \N NONE -id INT Yes false \N NONE -largeint_col LARGEINT Yes false \N NONE -smallint_col SMALLINT Yes false \N NONE -string_col TEXT Yes false \N NONE -string_col TEXT Yes false \N NONE -string_col TEXT Yes false \N NONE -tinyint_col TINYINT Yes false \N NONE +bigint_col bigint Yes false \N NONE +date_col date Yes false \N NONE +datetime_col datetime(3) Yes false \N NONE +decimal_col decimal(10,5) Yes false \N NONE +double_col double Yes false \N NONE +float_col float Yes false \N NONE +id int Yes false \N NONE +largeint_col largeint Yes false \N NONE +smallint_col smallint Yes false \N NONE +string_col text Yes false \N NONE +string_col text Yes false \N NONE +string_col text Yes false \N NONE +tinyint_col tinyint Yes false \N NONE diff --git a/regression-test/data/external_table_p0/tvf/test_hdfs_tvf_error_uri.out b/regression-test/data/external_table_p0/tvf/test_hdfs_tvf_error_uri.out index 115f42f2a0e23f..19c16df7f1394f 100644 --- a/regression-test/data/external_table_p0/tvf/test_hdfs_tvf_error_uri.out +++ b/regression-test/data/external_table_p0/tvf/test_hdfs_tvf_error_uri.out @@ -2,5 +2,5 @@ -- !select1 -- -- !desc1 -- -__dummy_col TEXT Yes false \N NONE +__dummy_col text Yes false \N NONE diff --git a/regression-test/data/external_table_p0/tvf/test_tvf_avro.out b/regression-test/data/external_table_p0/tvf/test_tvf_avro.out index 8f39bd410c9e67..fc6257d90165ff 100644 --- a/regression-test/data/external_table_p0/tvf/test_tvf_avro.out +++ b/regression-test/data/external_table_p0/tvf/test_tvf_avro.out @@ -1,18 +1,18 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !1 -- -aBoolean BOOLEAN Yes false \N NONE -aInt INT Yes false \N NONE -aLong BIGINT Yes false \N NONE -aFloat FLOAT Yes false \N NONE -aDouble DOUBLE Yes false \N NONE -aString TEXT Yes false \N NONE -anArray ARRAY Yes false \N NONE -aMap MAP Yes false \N NONE -anEnum TEXT Yes false \N NONE -aRecord STRUCT Yes false \N NONE -aUnion STRUCT Yes false \N NONE -mapArrayLong MAP> Yes false \N NONE -arrayMapBoolean ARRAY> Yes false \N NONE +aBoolean boolean Yes false \N NONE +aInt int Yes false \N NONE +aLong bigint Yes false \N NONE +aFloat float Yes false \N NONE +aDouble double Yes false \N NONE +aString text Yes false \N NONE +anArray array Yes false \N NONE +aMap map Yes false \N NONE +anEnum text Yes false \N NONE +aRecord struct Yes false \N NONE +aUnion struct Yes false \N NONE +mapArrayLong map> Yes false \N NONE +arrayMapBoolean array> Yes false \N NONE -- !2 -- 2 @@ -50,19 +50,19 @@ B [{"arrayMapKey1":0}, {"arrayMapKey2":1}] -- !3 -- -aBoolean BOOLEAN Yes false \N NONE -aInt INT Yes false \N NONE -aLong BIGINT Yes false \N NONE -aFloat FLOAT Yes false \N NONE -aDouble DOUBLE Yes false \N NONE -aString TEXT Yes false \N NONE -anArray ARRAY Yes false \N NONE -aMap MAP Yes false \N NONE -anEnum TEXT Yes false \N NONE -aRecord STRUCT Yes false \N NONE -aUnion STRUCT Yes false \N NONE -mapArrayLong MAP> Yes false \N NONE -arrayMapBoolean ARRAY> Yes false \N NONE +aBoolean boolean Yes false \N NONE +aInt int Yes false \N NONE +aLong bigint Yes false \N NONE +aFloat float Yes false \N NONE +aDouble double Yes false \N NONE +aString text Yes false \N NONE +anArray array Yes false \N NONE +aMap map Yes false \N NONE +anEnum text Yes false \N NONE +aRecord struct Yes false \N NONE +aUnion struct Yes false \N NONE +mapArrayLong map> Yes false \N NONE +arrayMapBoolean array> Yes false \N NONE -- !9 -- false 100 9999 2.11 9.1102 string test [5, 6, 7] {"k1":1, "k2":2} B {"a": 5, "b": 3.14159265358979, "c": "Simple Record String Field"} \N {"k11":[77, 11, 33], "k22":[10, 20]} [{"Key11":1}, {"Key22":0}] diff --git a/regression-test/data/index_p0/test_bitmap_index.out b/regression-test/data/index_p0/test_bitmap_index.out index 95e9be7bb1dae1..cf29770fa5c414 100644 --- a/regression-test/data/index_p0/test_bitmap_index.out +++ b/regression-test/data/index_p0/test_bitmap_index.out @@ -1,73 +1,73 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !sql -- -k1 TINYINT Yes true \N -k2 SMALLINT Yes true \N -k3 INT Yes true \N -k4 BIGINT Yes false \N NONE -k5 CHAR(1) Yes false \N NONE -k6 VARCHAR(1) Yes false \N NONE -k7 DATE Yes false \N NONE -k8 DATETIME Yes false \N NONE -k9 LARGEINT Yes false \N NONE -k10 DECIMAL Yes false \N NONE -k11 BOOLEAN Yes false \N NONE -k12 DATE Yes false \N NONE -k13 DATETIME Yes false \N NONE -k14 DATETIME(3) Yes false \N NONE -k15 DATETIME(6) Yes false \N NONE +k1 tinyint Yes true \N +k2 smallint Yes true \N +k3 int Yes true \N +k4 bigint Yes false \N NONE +k5 char(1) Yes false \N NONE +k6 varchar(1) Yes false \N NONE +k7 date Yes false \N NONE +k8 datetime Yes false \N NONE +k9 largeint Yes false \N NONE +k10 decimal Yes false \N NONE +k11 boolean Yes false \N NONE +k12 date Yes false \N NONE +k13 datetime Yes false \N NONE +k14 datetime(3) Yes false \N NONE +k15 datetime(6) Yes false \N NONE -- !sql -- 1 1 1 1 1 1 2022-05-31 2022-05-31T10:00 1 1 true 2022-05-31 2022-05-31T10:00 2022-05-31T10:00:00.111 2022-05-31T10:00:00.111111 -- !sql -- -k1 TINYINT Yes true \N -k2 SMALLINT Yes true \N -k3 INT Yes true \N -k4 BIGINT Yes true \N -k5 CHAR(1) Yes true \N -k6 VARCHAR(1) Yes true \N -k7 DATE Yes true \N -k8 DATETIME Yes true \N -k9 LARGEINT Yes true \N -k10 DECIMAL Yes true \N -k11 BOOLEAN Yes true \N -k12 DATE Yes true \N -k13 DATETIME Yes true \N -k14 DATETIME(3) Yes true \N -k15 DATETIME(6) Yes true \N -v1 INT Yes false \N SUM +k1 tinyint Yes true \N +k2 smallint Yes true \N +k3 int Yes true \N +k4 bigint Yes true \N +k5 char(1) Yes true \N +k6 varchar(1) Yes true \N +k7 date Yes true \N +k8 datetime Yes true \N +k9 largeint Yes true \N +k10 decimal Yes true \N +k11 boolean Yes true \N +k12 date Yes true \N +k13 datetime Yes true \N +k14 datetime(3) Yes true \N +k15 datetime(6) Yes true \N +v1 int Yes false \N SUM -- !sql -- 1 1 1 1 1 1 2022-05-31 2022-05-31T10:00 1 1 true 2022-05-31 2022-05-31T10:00 2022-05-31T10:00:00.111 2022-05-31T10:00:00.111111 1 -- !sql -- -k1 TINYINT Yes true \N -k2 SMALLINT Yes true \N -k3 INT Yes true \N -k4 BIGINT Yes true \N -k5 CHAR(1) Yes true \N -k6 VARCHAR(1) Yes true \N -k7 DATE Yes true \N -k8 DATETIME Yes true \N -k9 LARGEINT Yes true \N -k10 DECIMAL Yes true \N -k11 BOOLEAN Yes true \N -k12 DATE Yes false \N REPLACE -k13 DATETIME Yes false \N REPLACE -k14 DATETIME(3) Yes false \N REPLACE -k15 DATETIME(6) Yes false \N REPLACE -v1 INT Yes false \N REPLACE +k1 tinyint Yes true \N +k2 smallint Yes true \N +k3 int Yes true \N +k4 bigint Yes true \N +k5 char(1) Yes true \N +k6 varchar(1) Yes true \N +k7 date Yes true \N +k8 datetime Yes true \N +k9 largeint Yes true \N +k10 decimal Yes true \N +k11 boolean Yes true \N +k12 date Yes false \N REPLACE +k13 datetime Yes false \N REPLACE +k14 datetime(3) Yes false \N REPLACE +k15 datetime(6) Yes false \N REPLACE +v1 int Yes false \N REPLACE -- !sql -- 1 1 1 1 1 1 2022-05-31 2022-05-31T10:00 1 1 true 2022-05-31 2022-05-31T10:00 2022-05-31T10:00:00.111 2022-05-31T10:00:00.111111 1 -- !sql -- -create_time DATETIME No true \N -vid VARCHAR(64) No true \N -report_time DATETIME Yes true \N -block_version INT Yes false \N REPLACE -vehicle_mode INT Yes false \N REPLACE -usage_mode INT Yes false \N REPLACE +create_time datetime No true \N +vid varchar(64) No true \N +report_time datetime Yes true \N +block_version int Yes false \N REPLACE +vehicle_mode int Yes false \N REPLACE +usage_mode int Yes false \N REPLACE -- !sql -- 2 @@ -86,12 +86,12 @@ usage_mode INT Yes false \N REPLACE 2023-08-25T11:00 123 2023-08-25T11:00 2 2 2 -- !sql -- -create_time DATETIME No true \N -vid VARCHAR(64) No true \N -report_time DATETIME Yes true \N -block_version INT Yes false \N NONE -vehicle_mode INT Yes false \N NONE -usage_mode INT Yes false \N NONE +create_time datetime No true \N +vid varchar(64) No true \N +report_time datetime Yes true \N +block_version int Yes false \N NONE +vehicle_mode int Yes false \N NONE +usage_mode int Yes false \N NONE -- !sql -- 2 diff --git a/regression-test/data/index_p0/test_decimal_bitmap_index_multi_page.out b/regression-test/data/index_p0/test_decimal_bitmap_index_multi_page.out index aeb0972b318654..785a3f2c580c86 100644 --- a/regression-test/data/index_p0/test_decimal_bitmap_index_multi_page.out +++ b/regression-test/data/index_p0/test_decimal_bitmap_index_multi_page.out @@ -1,6 +1,6 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !sql -- -a DECIMAL(12, 6) No true \N +a decimal(12, 6) No true \N -- !sql -- 0.000001 diff --git a/regression-test/data/inverted_index_p0/test_bitmap_index.out b/regression-test/data/inverted_index_p0/test_bitmap_index.out index cb18b4b1bc8fc4..17b5e4fbfc083e 100644 --- a/regression-test/data/inverted_index_p0/test_bitmap_index.out +++ b/regression-test/data/inverted_index_p0/test_bitmap_index.out @@ -1,50 +1,50 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !sql -- -k1 TINYINT Yes true \N -k2 SMALLINT Yes true \N -k3 INT Yes true \N -k4 BIGINT Yes false \N NONE -k5 CHAR(1) Yes false \N NONE -k6 VARCHAR(1) Yes false \N NONE -k7 DATE Yes false \N NONE -k8 DATETIME Yes false \N NONE -k9 LARGEINT Yes false \N NONE -k10 DECIMAL Yes false \N NONE -k11 BOOLEAN Yes false \N NONE +k1 tinyint Yes true \N +k2 smallint Yes true \N +k3 int Yes true \N +k4 bigint Yes false \N NONE +k5 char(1) Yes false \N NONE +k6 varchar(1) Yes false \N NONE +k7 date Yes false \N NONE +k8 datetime Yes false \N NONE +k9 largeint Yes false \N NONE +k10 decimal Yes false \N NONE +k11 boolean Yes false \N NONE -- !sql -- 1 1 1 1 1 1 2022-05-31 2022-05-31T10:00 1 1 true -- !sql -- -k1 TINYINT Yes true \N -k2 SMALLINT Yes true \N -k3 INT Yes true \N -k4 BIGINT Yes true \N -k5 CHAR(1) Yes true \N -k6 VARCHAR(1) Yes true \N -k7 DATE Yes true \N -k8 DATETIME Yes true \N -k9 LARGEINT Yes true \N -k10 DECIMAL Yes true \N -k11 BOOLEAN Yes true \N -v1 INT Yes false \N SUM +k1 tinyint Yes true \N +k2 smallint Yes true \N +k3 int Yes true \N +k4 bigint Yes true \N +k5 char(1) Yes true \N +k6 varchar(1) Yes true \N +k7 date Yes true \N +k8 datetime Yes true \N +k9 largeint Yes true \N +k10 decimal Yes true \N +k11 boolean Yes true \N +v1 int Yes false \N SUM -- !sql -- 1 1 1 1 1 1 2022-05-31 2022-05-31T10:00 1 1 true 1 -- !sql -- -k1 TINYINT Yes true \N -k2 SMALLINT Yes true \N -k3 INT Yes true \N -k4 BIGINT Yes true \N -k5 CHAR(1) Yes true \N -k6 VARCHAR(1) Yes true \N -k7 DATE Yes true \N -k8 DATETIME Yes true \N -k9 LARGEINT Yes true \N -k10 DECIMAL Yes true \N -k11 BOOLEAN Yes true \N -v1 INT Yes false \N REPLACE +k1 tinyint Yes true \N +k2 smallint Yes true \N +k3 int Yes true \N +k4 bigint Yes true \N +k5 char(1) Yes true \N +k6 varchar(1) Yes true \N +k7 date Yes true \N +k8 datetime Yes true \N +k9 largeint Yes true \N +k10 decimal Yes true \N +k11 boolean Yes true \N +v1 int Yes false \N REPLACE -- !sql -- 1 1 1 1 1 1 2022-05-31 2022-05-31T10:00 1 1 true 1 diff --git a/regression-test/data/inverted_index_p0/test_inverted_index.out b/regression-test/data/inverted_index_p0/test_inverted_index.out index 0c11ea99116888..92fc2e958c9536 100644 --- a/regression-test/data/inverted_index_p0/test_inverted_index.out +++ b/regression-test/data/inverted_index_p0/test_inverted_index.out @@ -1,62 +1,62 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !sql -- -k1 TINYINT Yes true \N -k2 SMALLINT Yes true \N -k3 INT Yes true \N -k4 BIGINT Yes false \N NONE -k5 CHAR(1) Yes false \N NONE -k6 VARCHAR(1) Yes false \N NONE -k7 DATE Yes false \N NONE -k8 DATETIME Yes false \N NONE -k9 LARGEINT Yes false \N NONE -k10 DECIMAL Yes false \N NONE -k11 BOOLEAN Yes false \N NONE -k12 DATE Yes false \N NONE -k13 DATETIME Yes false \N NONE -k14 DATETIME(3) Yes false \N NONE -k15 DATETIME(6) Yes false \N NONE +k1 tinyint Yes true \N +k2 smallint Yes true \N +k3 int Yes true \N +k4 bigint Yes false \N NONE +k5 char(1) Yes false \N NONE +k6 varchar(1) Yes false \N NONE +k7 date Yes false \N NONE +k8 datetime Yes false \N NONE +k9 largeint Yes false \N NONE +k10 decimal Yes false \N NONE +k11 boolean Yes false \N NONE +k12 date Yes false \N NONE +k13 datetime Yes false \N NONE +k14 datetime(3) Yes false \N NONE +k15 datetime(6) Yes false \N NONE -- !sql -- 1 1 1 1 1 1 2022-05-31 2022-05-31T10:00 1 1 true 2022-05-31 2022-05-31T10:00 2022-05-31T10:00:00.111 2022-05-31T10:00:00.111111 -- !sql -- -k1 TINYINT Yes true \N -k2 SMALLINT Yes true \N -k3 INT Yes true \N -k4 BIGINT Yes true \N -k5 CHAR(1) Yes true \N -k6 VARCHAR(1) Yes true \N -k7 DATE Yes true \N -k8 DATETIME Yes true \N -k9 LARGEINT Yes true \N -k10 DECIMAL Yes true \N -k11 BOOLEAN Yes true \N -k12 DATE Yes true \N -k13 DATETIME Yes true \N -k14 DATETIME(3) Yes true \N -k15 DATETIME(6) Yes true \N -v1 INT Yes false \N SUM +k1 tinyint Yes true \N +k2 smallint Yes true \N +k3 int Yes true \N +k4 bigint Yes true \N +k5 char(1) Yes true \N +k6 varchar(1) Yes true \N +k7 date Yes true \N +k8 datetime Yes true \N +k9 largeint Yes true \N +k10 decimal Yes true \N +k11 boolean Yes true \N +k12 date Yes true \N +k13 datetime Yes true \N +k14 datetime(3) Yes true \N +k15 datetime(6) Yes true \N +v1 int Yes false \N SUM -- !sql -- 1 1 1 1 1 1 2022-05-31 2022-05-31T10:00 1 1 true 2022-05-31 2022-05-31T10:00 2022-05-31T10:00:00.111 2022-05-31T10:00:00.111111 1 -- !sql -- -k1 TINYINT Yes true \N -k2 SMALLINT Yes true \N -k3 INT Yes true \N -k4 BIGINT Yes true \N -k5 CHAR(1) Yes true \N -k6 VARCHAR(1) Yes true \N -k7 DATE Yes true \N -k8 DATETIME Yes true \N -k9 LARGEINT Yes true \N -k10 DECIMAL Yes true \N -k11 BOOLEAN Yes true \N -k12 DATE Yes false \N NONE -k13 DATETIME Yes false \N NONE -k14 DATETIME(3) Yes false \N NONE -k15 DATETIME(6) Yes false \N NONE -v1 INT Yes false \N NONE +k1 tinyint Yes true \N +k2 smallint Yes true \N +k3 int Yes true \N +k4 bigint Yes true \N +k5 char(1) Yes true \N +k6 varchar(1) Yes true \N +k7 date Yes true \N +k8 datetime Yes true \N +k9 largeint Yes true \N +k10 decimal Yes true \N +k11 boolean Yes true \N +k12 date Yes false \N NONE +k13 datetime Yes false \N NONE +k14 datetime(3) Yes false \N NONE +k15 datetime(6) Yes false \N NONE +v1 int Yes false \N NONE -- !sql -- 1 1 1 1 1 1 2022-05-31 2022-05-31T10:00 1 1 true 2022-05-31 2022-05-31T10:00 2022-05-31T10:00:00.111 2022-05-31T10:00:00.111111 1 diff --git a/regression-test/data/load_p0/tvf/test_tvf_empty_file.out b/regression-test/data/load_p0/tvf/test_tvf_empty_file.out index 59822770e2cd0c..282bf3356110b8 100644 --- a/regression-test/data/load_p0/tvf/test_tvf_empty_file.out +++ b/regression-test/data/load_p0/tvf/test_tvf_empty_file.out @@ -2,7 +2,7 @@ -- !select -- -- !desc -- -__dummy_col TEXT Yes false \N NONE +__dummy_col text Yes false \N NONE -- !select2 -- 1 doris 18 @@ -11,7 +11,7 @@ __dummy_col TEXT Yes false \N NONE 4 yyy 21 -- !des2 -- -c1 TEXT Yes false \N NONE -c2 TEXT Yes false \N NONE -c3 TEXT Yes false \N NONE +c1 text Yes false \N NONE +c2 text Yes false \N NONE +c3 text Yes false \N NONE diff --git a/regression-test/data/load_p0/tvf/test_tvf_error_url.out b/regression-test/data/load_p0/tvf/test_tvf_error_url.out index 468a50ff85d073..07739567b70ed2 100644 --- a/regression-test/data/load_p0/tvf/test_tvf_error_url.out +++ b/regression-test/data/load_p0/tvf/test_tvf_error_url.out @@ -2,10 +2,10 @@ -- !select -- -- !desc -- -__dummy_col TEXT Yes false \N NONE +__dummy_col text Yes false \N NONE -- !select2 -- -- !desc2 -- -__dummy_col TEXT Yes false \N NONE +__dummy_col text Yes false \N NONE diff --git a/regression-test/data/mv_p0/varchar_length/varchar_length.out b/regression-test/data/mv_p0/varchar_length/varchar_length.out index 2943852ba7bcdd..eec81428080116 100644 --- a/regression-test/data/mv_p0/varchar_length/varchar_length.out +++ b/regression-test/data/mv_p0/varchar_length/varchar_length.out @@ -1,8 +1,8 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !select_exp -- -test1 UNIQUE_KEYS vid VARCHAR(1) VARCHAR(1) No true \N true - report_time INT INT No true \N true +test1 UNIQUE_KEYS vid varchar(1) varchar(1) No true \N true + report_time int int No true \N true -mv_test UNIQUE_KEYS mv_report_time INT INT No true \N true `report_time` - mv_vid VARCHAR(65533) VARCHAR(65533) No true \N NONE true `vid` +mv_test UNIQUE_KEYS mv_report_time int int No true \N true `report_time` + mv_vid varchar(65533) varchar(65533) No true \N NONE true `vid` diff --git a/regression-test/data/nereids_syntax_p0/rollup/agg.out b/regression-test/data/nereids_syntax_p0/rollup/agg.out index a79101110e3400..27f6526aec47a9 100644 --- a/regression-test/data/nereids_syntax_p0/rollup/agg.out +++ b/regression-test/data/nereids_syntax_p0/rollup/agg.out @@ -1,15 +1,15 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !sql -- -test_rollup_agg1 AGG_KEYS siteid INT INT No true \N true - citycode SMALLINT SMALLINT No true \N true - username VARCHAR(32) VARCHAR(32) No true \N true - pv BIGINT BIGINT No false 0 SUM true - uv BIGINT BIGINT No false 0 SUM true - vv BIGINT BIGINT Yes false 0 SUM true +test_rollup_agg1 AGG_KEYS siteid int int No true \N true + citycode smallint smallint No true \N true + username varchar(32) varchar(32) No true \N true + pv bigint bigint No false 0 SUM true + uv bigint bigint No false 0 SUM true + vv bigint bigint Yes false 0 SUM true -rollup_city AGG_KEYS citycode SMALLINT SMALLINT No true \N true - pv BIGINT BIGINT No false 0 SUM true - vv BIGINT BIGINT Yes false 0 SUM true +rollup_city AGG_KEYS citycode smallint smallint No true \N true + pv bigint bigint No false 0 SUM true + vv bigint bigint Yes false 0 SUM true -- !sql -- 1 200 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 17fc18fae25d1d..3c85f24c2e69b8 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 28ee1fc66c35b9..28613c99b80a7f 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 4018c44c9389c8..b348514c97bf52 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/query_p0/system/test_metadata_name_ids.out b/regression-test/data/query_p0/system/test_metadata_name_ids.out index 4dc532f4d21ec2..66902cb74e39cc 100644 --- a/regression-test/data/query_p0/system/test_metadata_name_ids.out +++ b/regression-test/data/query_p0/system/test_metadata_name_ids.out @@ -1,11 +1,11 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !desc -- -CATALOG_ID BIGINT Yes false \N -CATALOG_NAME VARCHAR(512) Yes false \N -DATABASE_ID BIGINT Yes false \N -DATABASE_NAME VARCHAR(64) Yes false \N -TABLE_ID BIGINT Yes false \N -TABLE_NAME VARCHAR(64) Yes false \N +CATALOG_ID bigint Yes false \N +CATALOG_NAME varchar(512) Yes false \N +DATABASE_ID bigint Yes false \N +DATABASE_NAME varchar(64) Yes false \N +TABLE_ID bigint Yes false \N +TABLE_NAME varchar(64) Yes false \N -- !select2 -- internal demo test_metadata_name_ids diff --git a/regression-test/data/query_p0/system/test_query_sys_tables.out b/regression-test/data/query_p0/system/test_query_sys_tables.out index 91f54556ae8a35..d3a4ef5a57c36c 100644 --- a/regression-test/data/query_p0/system/test_query_sys_tables.out +++ b/regression-test/data/query_p0/system/test_query_sys_tables.out @@ -20,83 +20,83 @@ internal ccc 3 int int(11) 10 internal ddd 4 smallint smallint(6) 5 -- !desc_files -- -FILE_ID BIGINT Yes false \N -FILE_NAME TEXT Yes false \N -FILE_TYPE VARCHAR(256) Yes false \N -TABLESPACE_NAME VARCHAR(256) Yes false \N -TABLE_CATALOG CHAR(16) Yes false \N -TABLE_SCHEMA TEXT Yes false \N -TABLE_NAME TEXT Yes false \N -LOGFILE_GROUP_NAME VARCHAR(256) Yes false \N -LOGFILE_GROUP_NUMBER BIGINT Yes false \N -ENGINE VARCHAR(64) Yes false \N -FULLTEXT_KEYS TEXT Yes false \N -DELETED_ROWS TEXT Yes false \N -UPDATE_COUNT TEXT Yes false \N -FREE_EXTENTS BIGINT Yes false \N -TOTAL_EXTENTS BIGINT Yes false \N -EXTENT_SIZE BIGINT Yes false \N -INITIAL_SIZE BIGINT Yes false \N -MAXIMUM_SIZE BIGINT Yes false \N -AUTOEXTEND_SIZE BIGINT Yes false \N -CREATION_TIME TEXT Yes false \N -LAST_UPDATE_TIME TEXT Yes false \N -LAST_ACCESS_TIME TEXT Yes false \N -RECOVER_TIME TEXT Yes false \N -TRANSACTION_COUNTER TEXT Yes false \N -VERSION BIGINT Yes false \N -ROW_FORMAT VARCHAR(256) Yes false \N -TABLE_ROWS TEXT Yes false \N -AVG_ROW_LENGTH TEXT Yes false \N -DATA_LENGTH TEXT Yes false \N -MAX_DATA_LENGTH TEXT Yes false \N -INDEX_LENGTH TEXT Yes false \N -DATA_FREE BIGINT Yes false \N -CREATE_TIME TEXT Yes false \N -UPDATE_TIME TEXT Yes false \N -CHECK_TIME TEXT Yes false \N -CHECKSUM TEXT Yes false \N -STATUS VARCHAR(256) Yes false \N -EXTRA VARCHAR(256) Yes false \N +FILE_ID bigint Yes false \N +FILE_NAME text Yes false \N +FILE_TYPE varchar(256) Yes false \N +TABLESPACE_NAME varchar(256) Yes false \N +TABLE_CATALOG char(16) Yes false \N +TABLE_SCHEMA text Yes false \N +TABLE_NAME text Yes false \N +LOGFILE_GROUP_NAME varchar(256) Yes false \N +LOGFILE_GROUP_NUMBER bigint Yes false \N +ENGINE varchar(64) Yes false \N +FULLTEXT_KEYS text Yes false \N +DELETED_ROWS text Yes false \N +UPDATE_COUNT text Yes false \N +FREE_EXTENTS bigint Yes false \N +TOTAL_EXTENTS bigint Yes false \N +EXTENT_SIZE bigint Yes false \N +INITIAL_SIZE bigint Yes false \N +MAXIMUM_SIZE bigint Yes false \N +AUTOEXTEND_SIZE bigint Yes false \N +CREATION_TIME text Yes false \N +LAST_UPDATE_TIME text Yes false \N +LAST_ACCESS_TIME text Yes false \N +RECOVER_TIME text Yes false \N +TRANSACTION_COUNTER text Yes false \N +VERSION bigint Yes false \N +ROW_FORMAT varchar(256) Yes false \N +TABLE_ROWS text Yes false \N +AVG_ROW_LENGTH text Yes false \N +DATA_LENGTH text Yes false \N +MAX_DATA_LENGTH text Yes false \N +INDEX_LENGTH text Yes false \N +DATA_FREE bigint Yes false \N +CREATE_TIME text Yes false \N +UPDATE_TIME text Yes false \N +CHECK_TIME text Yes false \N +CHECKSUM text Yes false \N +STATUS varchar(256) Yes false \N +EXTRA varchar(256) Yes false \N -- !query_files -- -- !desc_statistics -- -TABLE_CATALOG VARCHAR(512) Yes false \N -TABLE_SCHEMA VARCHAR(64) Yes false \N -TABLE_NAME VARCHAR(64) Yes false \N -NON_UNIQUE BIGINT Yes false \N -INDEX_SCHEMA VARCHAR(64) Yes false \N -INDEX_NAME VARCHAR(64) Yes false \N -SEQ_IN_INDEX BIGINT Yes false \N -COLUMN_NAME VARCHAR(64) Yes false \N -COLLATION VARCHAR(1) Yes false \N -CARDINALITY BIGINT Yes false \N -SUB_PART BIGINT Yes false \N -PACKED VARCHAR(10) Yes false \N -NULLABLE VARCHAR(3) Yes false \N -INDEX_TYPE VARCHAR(16) Yes false \N -COMMENT VARCHAR(16) Yes false \N -INDEX_COMMENT VARCHAR(1024) Yes false \N +TABLE_CATALOG varchar(512) Yes false \N +TABLE_SCHEMA varchar(64) Yes false \N +TABLE_NAME varchar(64) Yes false \N +NON_UNIQUE bigint Yes false \N +INDEX_SCHEMA varchar(64) Yes false \N +INDEX_NAME varchar(64) Yes false \N +SEQ_IN_INDEX bigint Yes false \N +COLUMN_NAME varchar(64) Yes false \N +COLLATION varchar(1) Yes false \N +CARDINALITY bigint Yes false \N +SUB_PART bigint Yes false \N +PACKED varchar(10) Yes false \N +NULLABLE varchar(3) Yes false \N +INDEX_TYPE varchar(16) Yes false \N +COMMENT varchar(16) Yes false \N +INDEX_COMMENT varchar(1024) Yes false \N -- !query_statistics -- -- !desc_statistics -- -CONSTRAINT_CATALOG VARCHAR(512) Yes false \N -CONSTRAINT_SCHEMA VARCHAR(64) Yes false \N -CONSTRAINT_NAME VARCHAR(64) Yes false \N -TABLE_SCHEMA VARCHAR(64) Yes false \N -TABLE_NAME VARCHAR(64) Yes false \N -CONSTRAINT_TYPE VARCHAR(64) Yes false \N +CONSTRAINT_CATALOG varchar(512) Yes false \N +CONSTRAINT_SCHEMA varchar(64) Yes false \N +CONSTRAINT_NAME varchar(64) Yes false \N +TABLE_SCHEMA varchar(64) Yes false \N +TABLE_NAME varchar(64) Yes false \N +CONSTRAINT_TYPE varchar(64) Yes false \N -- !query_table_constraints -- -- !desc_schema_privileges -- -GRANTEE VARCHAR(81) Yes false \N -TABLE_CATALOG VARCHAR(512) Yes false \N -TABLE_SCHEMA VARCHAR(64) Yes false \N -PRIVILEGE_TYPE VARCHAR(64) Yes false \N -IS_GRANTABLE VARCHAR(3) Yes false \N +GRANTEE varchar(81) Yes false \N +TABLE_CATALOG varchar(512) Yes false \N +TABLE_SCHEMA varchar(64) Yes false \N +PRIVILEGE_TYPE varchar(64) Yes false \N +IS_GRANTABLE varchar(3) Yes false \N -- !schema_privileges1 -- 'root'@'%' def mysql SELECT NO @@ -107,12 +107,12 @@ IS_GRANTABLE VARCHAR(3) Yes false \N -- !schema_privileges3 -- -- !desc_table_privileges -- -GRANTEE VARCHAR(81) Yes false \N -TABLE_CATALOG VARCHAR(512) Yes false \N -TABLE_SCHEMA VARCHAR(64) Yes false \N -TABLE_NAME VARCHAR(64) Yes false \N -PRIVILEGE_TYPE VARCHAR(64) Yes false \N -IS_GRANTABLE VARCHAR(3) Yes false \N +GRANTEE varchar(81) Yes false \N +TABLE_CATALOG varchar(512) Yes false \N +TABLE_SCHEMA varchar(64) Yes false \N +TABLE_NAME varchar(64) Yes false \N +PRIVILEGE_TYPE varchar(64) Yes false \N +IS_GRANTABLE varchar(3) Yes false \N -- !table_privileges -- @@ -126,47 +126,47 @@ IS_GRANTABLE VARCHAR(3) Yes false \N 'cywtable'@'%' def table_privileges_demo test_table_privileges INSERT NO -- !desc_partitions -- -TABLE_CATALOG VARCHAR(64) Yes false \N -TABLE_SCHEMA VARCHAR(64) Yes false \N -TABLE_NAME VARCHAR(64) Yes false \N -PARTITION_NAME VARCHAR(64) Yes false \N -SUBPARTITION_NAME VARCHAR(64) Yes false \N -PARTITION_ORDINAL_POSITION INT Yes false \N -SUBPARTITION_ORDINAL_POSITION INT Yes false \N -PARTITION_METHOD VARCHAR(13) Yes false \N -SUBPARTITION_METHOD VARCHAR(13) Yes false \N -PARTITION_EXPRESSION VARCHAR(2048) Yes false \N -SUBPARTITION_EXPRESSION VARCHAR(2048) Yes false \N -PARTITION_DESCRIPTION TEXT Yes false \N -TABLE_ROWS BIGINT Yes false \N -AVG_ROW_LENGTH BIGINT Yes false \N -DATA_LENGTH BIGINT Yes false \N -MAX_DATA_LENGTH BIGINT Yes false \N -INDEX_LENGTH BIGINT Yes false \N -DATA_FREE BIGINT Yes false \N -CREATE_TIME BIGINT Yes false \N -UPDATE_TIME DATETIME Yes false \N -CHECK_TIME DATETIME Yes false \N -CHECKSUM BIGINT Yes false \N -PARTITION_COMMENT TEXT Yes false \N -NODEGROUP VARCHAR(256) Yes false \N -TABLESPACE_NAME VARCHAR(268) Yes false \N +TABLE_CATALOG varchar(64) Yes false \N +TABLE_SCHEMA varchar(64) Yes false \N +TABLE_NAME varchar(64) Yes false \N +PARTITION_NAME varchar(64) Yes false \N +SUBPARTITION_NAME varchar(64) Yes false \N +PARTITION_ORDINAL_POSITION int Yes false \N +SUBPARTITION_ORDINAL_POSITION int Yes false \N +PARTITION_METHOD varchar(13) Yes false \N +SUBPARTITION_METHOD varchar(13) Yes false \N +PARTITION_EXPRESSION varchar(2048) Yes false \N +SUBPARTITION_EXPRESSION varchar(2048) Yes false \N +PARTITION_DESCRIPTION text Yes false \N +TABLE_ROWS bigint Yes false \N +AVG_ROW_LENGTH bigint Yes false \N +DATA_LENGTH bigint Yes false \N +MAX_DATA_LENGTH bigint Yes false \N +INDEX_LENGTH bigint Yes false \N +DATA_FREE bigint Yes false \N +CREATE_TIME bigint Yes false \N +UPDATE_TIME datetime Yes false \N +CHECK_TIME datetime Yes false \N +CHECKSUM bigint Yes false \N +PARTITION_COMMENT text Yes false \N +NODEGROUP varchar(256) Yes false \N +TABLESPACE_NAME varchar(268) Yes false \N -- !select_partitions -- -- !desc_rowsets -- -BACKEND_ID BIGINT Yes false \N -ROWSET_ID VARCHAR(64) Yes false \N -TABLET_ID BIGINT Yes false \N -ROWSET_NUM_ROWS BIGINT Yes false \N -TXN_ID BIGINT Yes false \N -NUM_SEGMENTS BIGINT Yes false \N -START_VERSION BIGINT Yes false \N -END_VERSION BIGINT Yes false \N -INDEX_DISK_SIZE BIGINT Yes false \N -DATA_DISK_SIZE BIGINT Yes false \N -CREATION_TIME BIGINT Yes false \N -NEWEST_WRITE_TIMESTAMP BIGINT Yes false \N +BACKEND_ID bigint Yes false \N +ROWSET_ID varchar(64) Yes false \N +TABLET_ID bigint Yes false \N +ROWSET_NUM_ROWS bigint Yes false \N +TXN_ID bigint Yes false \N +NUM_SEGMENTS bigint Yes false \N +START_VERSION bigint Yes false \N +END_VERSION bigint Yes false \N +INDEX_DISK_SIZE bigint Yes false \N +DATA_DISK_SIZE bigint Yes false \N +CREATION_TIME bigint Yes false \N +NEWEST_WRITE_TIMESTAMP bigint Yes false \N -- !rowsets1 -- 0 1 diff --git a/regression-test/data/rollup/test_materialized_view_hll.out b/regression-test/data/rollup/test_materialized_view_hll.out index 9721b8612c6d76..99dcf35a1ce41a 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 bdc8e1cd81f629..1cbbfd15953b83 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 7caf3713fe743c..ee9cdda99a3a7b 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.out b/regression-test/data/rollup_p0/test_rollup_agg.out index 8cdb01eb75c14e..aaa03c5e4ae4a7 100644 --- a/regression-test/data/rollup_p0/test_rollup_agg.out +++ b/regression-test/data/rollup_p0/test_rollup_agg.out @@ -1,15 +1,15 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !sql -- -test_rollup_agg AGG_KEYS siteid INT INT No true \N true - citycode SMALLINT SMALLINT No true \N true - username VARCHAR(32) VARCHAR(32) No true \N true - pv BIGINT BIGINT No false 0 SUM true - uv BIGINT BIGINT No false 0 SUM true - vv BIGINT BIGINT Yes false 0 SUM true +test_rollup_agg AGG_KEYS siteid int int No true \N true + citycode smallint smallint No true \N true + username varchar(32) varchar(32) No true \N true + pv bigint bigint No false 0 SUM true + uv bigint bigint No false 0 SUM true + vv bigint bigint Yes false 0 SUM true -rollup_city AGG_KEYS citycode SMALLINT SMALLINT No true \N true - pv BIGINT BIGINT No false 0 SUM true - vv BIGINT BIGINT Yes false 0 SUM true +rollup_city AGG_KEYS citycode smallint smallint No true \N true + pv bigint bigint No false 0 SUM true + vv bigint bigint Yes false 0 SUM true -- !sql -- 1 200 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 c1b9d49855aa6e..dddd46df900644 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_type2.out b/regression-test/data/schema_change_p0/schema_change_modify_mv_column_type2.out index e8f586247cb840..287d1366a4badd 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 2de215cbd500ac..c86341a56862c3 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_alter_table_column.out b/regression-test/data/schema_change_p0/test_alter_table_column.out index f01d5d28edc730..1698ac7440d6ef 100644 --- a/regression-test/data/schema_change_p0/test_alter_table_column.out +++ b/regression-test/data/schema_change_p0/test_alter_table_column.out @@ -1,29 +1,29 @@ -- This file is automatically generated. You should know what you did if you want to edit this -- !sql -- -k1 INT Yes true \N -k2 INT Yes true \N -value1 INT Yes false \N NONE -value2 INT Yes false \N NONE +k1 int Yes true \N +k2 int Yes true \N +value1 int Yes false \N NONE +value2 int Yes false \N NONE -- !sql -- 1 1 10 20 1 1 30 40 -- !sql -- -k1 INT Yes true \N -k2 INT Yes true \N -value1 INT Yes false \N SUM -value2 INT Yes false \N SUM +k1 int Yes true \N +k2 int Yes true \N +value1 int Yes false \N SUM +value2 int Yes false \N SUM -- !sql -- 1 1 40 60 -- !sql -- -k1 INT Yes true \N -value1 INT Yes false \N NONE -value2 ARRAY Yes false [] NONE -value3 ARRAY Yes false \N NONE -value4 ARRAY No false [] NONE +k1 int Yes true \N +value1 int Yes false \N NONE +value2 array Yes false [] NONE +value3 array Yes false \N NONE +value4 array No false [] NONE -- !sql -- 1 2 [] \N [] diff --git a/regression-test/data/schema_change_p0/test_rename_column.out b/regression-test/data/schema_change_p0/test_rename_column.out index c55ccab9e0f0a322555edcc9c5933c84714d16cd..36479457c3c396cdaf0d95d91af88fdc74137d65 100644 GIT binary patch literal 4171 zcmeHK-)q}25Z>$Quh8DM2M@~`l8%#dYhpeD_krgtbzg1S! za={H&zkUXEGPzJ&bOkN;7hCmX# z3b?;rX)MeVUU(iac>W>qKf(j*tqq?e=+thsa<(_4@fD0v%YzBYwTWJY7AD%PXhe$6 ze8#0lV8aXF^O?PU|o!srip1ykO`t&)sAD^6tNTRMGC~1$;_O zs*QvExSNuW<4;FFN!ralrsI$-EQg6R33jaLVoh}3!Pm(ox(mnOLh>X`%AcK1eY>l6 zIli5aZdRHNCeV0nZ*(hqQnA#>aF_W6`^?8N4mMor9lEcn$U23mQj`CB8jqc~c7o{g z8?aS=ck~W%P))Yuz|J;lX#*{d$77%I(EUC(Pl0Kkak<}5cJS8t;yMy88RV#VidUH| TQgtt|WR_CCC4B=v4$^-BAZJ^z literal 4171 zcmeHK-*1~R5ZKc;>|!6o6-FDvw{486d_GP z%BDm};Pc(tzWeU{#V}B?W&$l4r%1g?F0+J477@<3Xhl=HA(FaE;D!$9w2Dk5YUFc)+avKYAb{C4K}0q`>*H#r5* zK7g@W1$?!GSwk8zxdl)5e0pckKUn5Ru%O~#Lsk?#c(&_mXN?&_UqRsbi<1dXgbaT( z!DP5!F>t(DX}%;}P=LobreR|BAk+L(K43n(ckSs6mgf13HvN11!}4L8$uP}1FHc_X zL&csewzt-4da4x9!i!_(5c4KZnd%g?LC%>6qM6Q>QrK2nfS)Q zI#6Ij*-w_P05*Y^TXpn;Ds=q<3`VB1gI2#&tL?N?pq#4BVA$IDAZrW~jYjFDv6JFeBWJm8Y&tpx+8cE@!{gVc8|m5 zJ$(1j(H`gmz9c5q#X%k(J=k-6&;AaRe(vEpK3ppf6J;FSxvnOL714R8hvB2|eDmQC zCKK{f>P(!#v+s}9DoL%`VgjvUccZK6iDs$K{xS2hn#`wU9C%#oow~26$S#GKQj`CB z8qb}#Zh~0m*TQvvkMvG)peMU=pk~{&w1t+|@Z4uSb>GD1B{0n^E}Q-22yd-_TxY^1 b1{<1^gibS_C+QQT1y+>uE$JKZDIxs_mdz~B 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 789964e9277e555238f1f972d1b3fe89243cabbe..6e406ff098f520d70fffafa157b2c451af279e15 100644 GIT binary patch delta 418 zcmcb@b%kp}ab8YhQF>}-UJ0jPK4(c$X)0%oA17BzVo53|m_Qay&Mc|qEK4j(&PXiM zFf!2Oj7%*?=t)dZ6h9Xm(TESV8nO6yvnD|hbEh#e{#QLSc45TK@GD2tv zMp@>JoSexCjEX=NCAolL8yad1XeEeObiC(cJ}gUNVonG(S({mt9pp!l>!Xp_4vZp`=Q9hj k1AV~>@rmf^k@e8we$a3{hTlS7yk*g(z;Gn(wnA})^ZE~pzP zuV9k5hdT+*Kz19%`J7ywoJfv@ITqxL$pI`9ybu?2La52w%$n>VKZ0Bzjl_0f6q!7q mS%@9z3r>hnL?@qR76s}C`39&P>M36=9`a?8Mzf`q" + exception "java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type boolean to target type=array" } test { sql "insert into tbl_array_nested_types_agg (c_tinyint) select c_tinyint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type TINYINT to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type tinyint to target type=array") } test { sql "insert into tbl_array_nested_types_agg (c_smallint) select c_smallint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type SMALLINT to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type smallint to target type=array") } test { sql "insert into tbl_array_nested_types_agg (c_int) select c_int from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type INT to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type int to target type=array") } test { sql "insert into tbl_array_nested_types_agg (c_largeint) select c_largeint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type LARGEINT to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type largeint to target type=array") } test { sql "insert into tbl_array_nested_types_agg (c_float) select c_float from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type FLOAT to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type float to target type=array") } test { sql "insert into tbl_array_nested_types_agg (c_double) select c_double from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DOUBLE to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type double to target type=array") } test { sql "insert into tbl_array_nested_types_agg (c_decimal) select c_decimal from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type decimalv3(20,3) to target type=array") } test { sql "insert into tbl_array_nested_types_agg (c_decimalv3) select c_decimalv3 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type decimalv3(20,3) to target type=array") } test { sql "insert into tbl_array_nested_types_agg (c_date) select c_date from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datev2 to target type=array") } test { sql "insert into tbl_array_nested_types_agg (c_datetime) select c_datetime from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datetimev2(0) to target type=array") } test { sql "insert into tbl_array_nested_types_agg (c_datev2) select c_datev2 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datev2 to target type=array") } test { sql "insert into tbl_array_nested_types_agg (c_datetimev2) select c_datetimev2 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datetimev2(0) to target type=array") } test { @@ -110,67 +110,67 @@ suite("test_nested_types_insert_into_with_agg_table", "p0") { // test action for scala to array with array-scala type test { sql "insert into tbl_array_nested_types_agg2 (c_bool) select c_bool from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type BOOLEAN to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type boolean to target type=array>") } test { sql "insert into tbl_array_nested_types_agg2 (c_tinyint) select c_tinyint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type TINYINT to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type tinyint to target type=array>") } test { sql "insert into tbl_array_nested_types_agg2 (c_smallint) select c_smallint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type SMALLINT to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type smallint to target type=array>") } test { sql "insert into tbl_array_nested_types_agg2 (c_int) select c_int from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type INT to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type int to target type=array>") } test { sql "insert into tbl_array_nested_types_agg2 (c_largeint) select c_largeint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type LARGEINT to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type largeint to target type=array>") } test { sql "insert into tbl_array_nested_types_agg2 (c_float) select c_float from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type FLOAT to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type float to target type=array>") } test { sql "insert into tbl_array_nested_types_agg2 (c_double) select c_double from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DOUBLE to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type double to target type=array>") } test { sql "insert into tbl_array_nested_types_agg2 (c_decimal) select c_decimal from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type decimalv3(20,3) to target type=array>") } test { sql "insert into tbl_array_nested_types_agg2 (c_decimalv3) select c_decimalv3 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type decimalv3(20,3) to target type=array>") } test { sql "insert into tbl_array_nested_types_agg2 (c_date) select c_date from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datev2 to target type=array>") } test { sql "insert into tbl_array_nested_types_agg2 (c_datetime) select c_datetime from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datetimev2(0) to target type=array>") } test { sql "insert into tbl_array_nested_types_agg2 (c_datev2) select c_datev2 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datev2 to target type=array>") } test { sql "insert into tbl_array_nested_types_agg2 (c_datetimev2) select c_datetimev2 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datetimev2(0) to target type=array>") } test { @@ -195,67 +195,67 @@ suite("test_nested_types_insert_into_with_agg_table", "p0") { // test action for scala to map with map-scala-scala type test { sql "insert into tbl_map_types_agg (c_bool) select c_bool from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type BOOLEAN to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type boolean to target type=map") } test { sql "insert into tbl_map_types_agg (c_tinyint) select c_tinyint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type TINYINT to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type tinyint to target type=map") } test { sql "insert into tbl_map_types_agg (c_smallint) select c_smallint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type SMALLINT to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type smallint to target type=map") } test { sql "insert into tbl_map_types_agg (c_int) select c_int from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type INT to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type int to target type=map") } test { sql "insert into tbl_map_types_agg (c_largeint) select c_largeint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type LARGEINT to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type largeint to target type=map") } test { sql "insert into tbl_map_types_agg (c_float) select c_float from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type FLOAT to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type float to target type=map") } test { sql "insert into tbl_map_types_agg (c_double) select c_double from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DOUBLE to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type double to target type=map") } test { sql "insert into tbl_map_types_agg (c_decimal) select c_decimal from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type decimalv3(20,3) to target type=map") } test { sql "insert into tbl_map_types_agg (c_decimalv3) select c_decimalv3 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type decimalv3(20,3) to target type=map") } test { sql "insert into tbl_map_types_agg (c_date) select c_date from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datev2 to target type=map") } test { sql "insert into tbl_map_types_agg (c_datetime) select c_datetime from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datetimev2(0) to target type=map") } test { sql "insert into tbl_map_types_agg (c_datev2) select c_datev2 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datev2 to target type=map") } test { sql "insert into tbl_map_types_agg (c_datetimev2) select c_datetimev2 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datetimev2(0) to target type=map") } test { @@ -279,67 +279,67 @@ suite("test_nested_types_insert_into_with_agg_table", "p0") { // test action for scala to array with map-scala-scala type test { sql "insert into tbl_array_map_types_agg (c_bool) select c_bool from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type BOOLEAN to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type boolean to target type=array>") } test { sql "insert into tbl_array_map_types_agg (c_tinyint) select c_tinyint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type TINYINT to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type tinyint to target type=array>") } test { sql "insert into tbl_array_map_types_agg (c_smallint) select c_smallint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type SMALLINT to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type smallint to target type=array>") } test { sql "insert into tbl_array_map_types_agg (c_int) select c_int from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type INT to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type int to target type=array>") } test { sql "insert into tbl_array_map_types_agg (c_largeint) select c_largeint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type LARGEINT to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type largeint to target type=array>") } test { sql "insert into tbl_array_map_types_agg (c_float) select c_float from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type FLOAT to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type float to target type=array>") } test { sql "insert into tbl_array_map_types_agg (c_double) select c_double from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DOUBLE to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type double to target type=array>") } test { sql "insert into tbl_array_map_types_agg (c_decimal) select c_decimal from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type decimalv3(20,3) to target type=array>") } test { sql "insert into tbl_array_map_types_agg (c_decimalv3) select c_decimalv3 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type decimalv3(20,3) to target type=array>") } test { sql "insert into tbl_array_map_types_agg (c_date) select c_date from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datev2 to target type=array>") } test { sql "insert into tbl_array_map_types_agg (c_datetime) select c_datetime from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datetimev2(0) to target type=array>") } test { sql "insert into tbl_array_map_types_agg (c_datev2) select c_datev2 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datev2 to target type=array>") } test { sql "insert into tbl_array_map_types_agg (c_datetimev2) select c_datetimev2 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datetimev2(0) to target type=array>") } test { @@ -364,67 +364,67 @@ suite("test_nested_types_insert_into_with_agg_table", "p0") { // test action for scala to array with array-scala type test { sql "insert into tbl_map_array_types_agg (c_bool) select c_bool from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type BOOLEAN to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type boolean to target type=map>") } test { sql "insert into tbl_map_array_types_agg (c_tinyint) select c_tinyint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type TINYINT to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type tinyint to target type=map>") } test { sql "insert into tbl_map_array_types_agg (c_smallint) select c_smallint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type SMALLINT to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type smallint to target type=map>") } test { sql "insert into tbl_map_array_types_agg (c_int) select c_int from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type INT to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type int to target type=map>") } test { sql "insert into tbl_map_array_types_agg (c_largeint) select c_largeint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type LARGEINT to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type largeint to target type=map>") } test { sql "insert into tbl_map_array_types_agg (c_float) select c_float from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type FLOAT to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type float to target type=map>") } test { sql "insert into tbl_map_array_types_agg (c_double) select c_double from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DOUBLE to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type double to target type=map>") } test { sql "insert into tbl_map_array_types_agg (c_decimal) select c_decimal from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type decimalv3(20,3) to target type=map>") } test { sql "insert into tbl_map_array_types_agg (c_decimalv3) select c_decimalv3 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type decimalv3(20,3) to target type=map>") } test { sql "insert into tbl_map_array_types_agg (c_date) select c_date from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datev2 to target type=map>") } test { sql "insert into tbl_map_array_types_agg (c_datetime) select c_datetime from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datetimev2(0) to target type=map>") } test { sql "insert into tbl_map_array_types_agg (c_datev2) select c_datev2 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datev2 to target type=map>") } test { sql "insert into tbl_map_array_types_agg (c_datetimev2) select c_datetimev2 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datetimev2(0) to target type=map>") } test { diff --git a/regression-test/suites/datatype_p0/nested_types/negative_cases/test_nested_types_insert_into_with_dup_table.groovy b/regression-test/suites/datatype_p0/nested_types/negative_cases/test_nested_types_insert_into_with_dup_table.groovy index f58e41078bf153..32cccc18054ae9 100644 --- a/regression-test/suites/datatype_p0/nested_types/negative_cases/test_nested_types_insert_into_with_dup_table.groovy +++ b/regression-test/suites/datatype_p0/nested_types/negative_cases/test_nested_types_insert_into_with_dup_table.groovy @@ -45,67 +45,67 @@ suite("test_nested_types_insert_into_with_dup_table", "p0") { // current we support char family to insert nested type test { sql "insert into tbl_array_nested_types_dup (c_bool) select c_bool from tbl_scalar_types_dup" - exception "java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type BOOLEAN to target type=ARRAY" + exception "java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type boolean to target type=array" } test { sql "insert into tbl_array_nested_types_dup (c_tinyint) select c_tinyint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type TINYINT to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type tinyint to target type=array") } test { sql "insert into tbl_array_nested_types_dup (c_smallint) select c_smallint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type SMALLINT to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type smallint to target type=array") } test { sql "insert into tbl_array_nested_types_dup (c_int) select c_int from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type INT to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type int to target type=array") } test { sql "insert into tbl_array_nested_types_dup (c_largeint) select c_largeint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type LARGEINT to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type largeint to target type=array") } test { sql "insert into tbl_array_nested_types_dup (c_float) select c_float from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type FLOAT to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type float to target type=array") } test { sql "insert into tbl_array_nested_types_dup (c_double) select c_double from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DOUBLE to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type double to target type=array") } test { sql "insert into tbl_array_nested_types_dup (c_decimal) select c_decimal from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type decimalv3(20,3) to target type=array") } test { sql "insert into tbl_array_nested_types_dup (c_decimalv3) select c_decimalv3 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type decimalv3(20,3) to target type=array") } test { sql "insert into tbl_array_nested_types_dup (c_date) select c_date from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datev2 to target type=array") } test { sql "insert into tbl_array_nested_types_dup (c_datetime) select c_datetime from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datetimev2(0) to target type=array") } test { sql "insert into tbl_array_nested_types_dup (c_datev2) select c_datev2 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datev2 to target type=array") } test { sql "insert into tbl_array_nested_types_dup (c_datetimev2) select c_datetimev2 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datetimev2(0) to target type=array") } test { @@ -128,67 +128,67 @@ suite("test_nested_types_insert_into_with_dup_table", "p0") { // test action for scala to array with array-scala type test { sql "insert into tbl_array_nested_types_dup2 (c_bool) select c_bool from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type BOOLEAN to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type boolean to target type=array>") } test { sql "insert into tbl_array_nested_types_dup2 (c_tinyint) select c_tinyint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type TINYINT to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type tinyint to target type=array>") } test { sql "insert into tbl_array_nested_types_dup2 (c_smallint) select c_smallint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type SMALLINT to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type smallint to target type=array>") } test { sql "insert into tbl_array_nested_types_dup2 (c_int) select c_int from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type INT to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type int to target type=array>") } test { sql "insert into tbl_array_nested_types_dup2 (c_largeint) select c_largeint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type LARGEINT to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type largeint to target type=array>") } test { sql "insert into tbl_array_nested_types_dup2 (c_float) select c_float from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type FLOAT to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type float to target type=array>") } test { sql "insert into tbl_array_nested_types_dup2 (c_double) select c_double from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DOUBLE to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type double to target type=array>") } test { sql "insert into tbl_array_nested_types_dup2 (c_decimal) select c_decimal from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type decimalv3(20,3) to target type=array>") } test { sql "insert into tbl_array_nested_types_dup2 (c_decimalv3) select c_decimalv3 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type decimalv3(20,3) to target type=array>") } test { sql "insert into tbl_array_nested_types_dup2 (c_date) select c_date from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datev2 to target type=array>") } test { sql "insert into tbl_array_nested_types_dup2 (c_datetime) select c_datetime from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datetimev2(0) to target type=array>") } test { sql "insert into tbl_array_nested_types_dup2 (c_datev2) select c_datev2 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datev2 to target type=array>") } test { sql "insert into tbl_array_nested_types_dup2 (c_datetimev2) select c_datetimev2 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datetimev2(0) to target type=array>") } test { @@ -212,67 +212,67 @@ suite("test_nested_types_insert_into_with_dup_table", "p0") { // test action for scala to map with map-scala-scala type test { sql "insert into tbl_map_types_dup (c_bool) select c_bool from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type BOOLEAN to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type boolean to target type=map") } test { sql "insert into tbl_map_types_dup (c_tinyint) select c_tinyint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type TINYINT to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type tinyint to target type=map") } test { sql "insert into tbl_map_types_dup (c_smallint) select c_smallint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type SMALLINT to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type smallint to target type=map") } test { sql "insert into tbl_map_types_dup (c_int) select c_int from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type INT to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type int to target type=map") } test { sql "insert into tbl_map_types_dup (c_largeint) select c_largeint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type LARGEINT to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type largeint to target type=map") } test { sql "insert into tbl_map_types_dup (c_float) select c_float from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type FLOAT to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type float to target type=map") } test { sql "insert into tbl_map_types_dup (c_double) select c_double from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DOUBLE to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type double to target type=map") } test { sql "insert into tbl_map_types_dup (c_decimal) select c_decimal from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type decimalv3(20,3) to target type=map") } test { sql "insert into tbl_map_types_dup (c_decimalv3) select c_decimalv3 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type decimalv3(20,3) to target type=map") } test { sql "insert into tbl_map_types_dup (c_date) select c_date from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datev2 to target type=map") } test { sql "insert into tbl_map_types_dup (c_datetime) select c_datetime from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datetimev2(0) to target type=map") } test { sql "insert into tbl_map_types_dup (c_datev2) select c_datev2 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datev2 to target type=map") } test { sql "insert into tbl_map_types_dup (c_datetimev2) select c_datetimev2 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datetimev2(0) to target type=map") } test { @@ -295,67 +295,67 @@ suite("test_nested_types_insert_into_with_dup_table", "p0") { // test action for scala to array with map-scala-scala type test { sql "insert into tbl_array_map_types_dup (c_bool) select c_bool from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type BOOLEAN to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type boolean to target type=array>") } test { sql "insert into tbl_array_map_types_dup (c_tinyint) select c_tinyint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type TINYINT to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type tinyint to target type=array>") } test { sql "insert into tbl_array_map_types_dup (c_smallint) select c_smallint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type SMALLINT to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type smallint to target type=array>") } test { sql "insert into tbl_array_map_types_dup (c_int) select c_int from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type INT to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type int to target type=array>") } test { sql "insert into tbl_array_map_types_dup (c_largeint) select c_largeint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type LARGEINT to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type largeint to target type=array>") } test { sql "insert into tbl_array_map_types_dup (c_float) select c_float from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type FLOAT to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type float to target type=array>") } test { sql "insert into tbl_array_map_types_dup (c_double) select c_double from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DOUBLE to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type double to target type=array>") } test { sql "insert into tbl_array_map_types_dup (c_decimal) select c_decimal from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type decimalv3(20,3) to target type=array>") } test { sql "insert into tbl_array_map_types_dup (c_decimalv3) select c_decimalv3 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type decimalv3(20,3) to target type=array>") } test { sql "insert into tbl_array_map_types_dup (c_date) select c_date from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datev2 to target type=array>") } test { sql "insert into tbl_array_map_types_dup (c_datetime) select c_datetime from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datetimev2(0) to target type=array>") } test { sql "insert into tbl_array_map_types_dup (c_datev2) select c_datev2 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datev2 to target type=array>") } test { sql "insert into tbl_array_map_types_dup (c_datetimev2) select c_datetimev2 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datetimev2(0) to target type=array>") } test { @@ -379,67 +379,67 @@ suite("test_nested_types_insert_into_with_dup_table", "p0") { // test action for scala to array with array-scala type test { sql "insert into tbl_map_array_types_dup (c_bool) select c_bool from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type BOOLEAN to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type boolean to target type=map>") } test { sql "insert into tbl_map_array_types_dup (c_tinyint) select c_tinyint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type TINYINT to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type tinyint to target type=map>") } test { sql "insert into tbl_map_array_types_dup (c_smallint) select c_smallint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type SMALLINT to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type smallint to target type=map>") } test { sql "insert into tbl_map_array_types_dup (c_int) select c_int from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type INT to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type int to target type=map>") } test { sql "insert into tbl_map_array_types_dup (c_largeint) select c_largeint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type LARGEINT to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type largeint to target type=map>") } test { sql "insert into tbl_map_array_types_dup (c_float) select c_float from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type FLOAT to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type float to target type=map>") } test { sql "insert into tbl_map_array_types_dup (c_double) select c_double from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DOUBLE to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type double to target type=map>") } test { sql "insert into tbl_map_array_types_dup (c_decimal) select c_decimal from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type decimalv3(20,3) to target type=map>") } test { sql "insert into tbl_map_array_types_dup (c_decimalv3) select c_decimalv3 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type decimalv3(20,3) to target type=map>") } test { sql "insert into tbl_map_array_types_dup (c_date) select c_date from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datev2 to target type=map>") } test { sql "insert into tbl_map_array_types_dup (c_datetime) select c_datetime from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datetimev2(0) to target type=map>") } test { sql "insert into tbl_map_array_types_dup (c_datev2) select c_datev2 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datev2 to target type=map>") } test { sql "insert into tbl_map_array_types_dup (c_datetimev2) select c_datetimev2 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datetimev2(0) to target type=map>") } test { diff --git a/regression-test/suites/datatype_p0/nested_types/negative_cases/test_nested_types_insert_into_with_unique_table.groovy b/regression-test/suites/datatype_p0/nested_types/negative_cases/test_nested_types_insert_into_with_unique_table.groovy index 9956a88e4c0354..681bc2a61f9231 100644 --- a/regression-test/suites/datatype_p0/nested_types/negative_cases/test_nested_types_insert_into_with_unique_table.groovy +++ b/regression-test/suites/datatype_p0/nested_types/negative_cases/test_nested_types_insert_into_with_unique_table.groovy @@ -26,67 +26,67 @@ suite("test_nested_types_insert_into_with_unique_table", "p0") { // mor table test test { sql "insert into tbl_array_nested_types_mor (c_bool) select c_bool from tbl_scalar_types_dup" - exception "java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type BOOLEAN to target type=ARRAY" + exception "java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type boolean to target type=array" } test { sql "insert into tbl_array_nested_types_mor (c_tinyint) select c_tinyint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type TINYINT to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type tinyint to target type=array") } test { sql "insert into tbl_array_nested_types_mor (c_smallint) select c_smallint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type SMALLINT to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type smallint to target type=array") } test { sql "insert into tbl_array_nested_types_mor (c_int) select c_int from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type INT to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type int to target type=array") } test { sql "insert into tbl_array_nested_types_mor (c_largeint) select c_largeint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type LARGEINT to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type largeint to target type=array") } test { sql "insert into tbl_array_nested_types_mor (c_float) select c_float from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type FLOAT to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type float to target type=array") } test { sql "insert into tbl_array_nested_types_mor (c_double) select c_double from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DOUBLE to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type double to target type=array") } test { sql "insert into tbl_array_nested_types_mor (c_decimal) select c_decimal from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type decimalv3(20,3) to target type=array") } test { sql "insert into tbl_array_nested_types_mor (c_decimalv3) select c_decimalv3 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type decimalv3(20,3) to target type=array") } test { sql "insert into tbl_array_nested_types_mor (c_date) select c_date from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datev2 to target type=array") } test { sql "insert into tbl_array_nested_types_mor (c_datetime) select c_datetime from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datetimev2(0) to target type=array") } test { sql "insert into tbl_array_nested_types_mor (c_datev2) select c_datev2 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datev2 to target type=array") } test { sql "insert into tbl_array_nested_types_mor (c_datetimev2) select c_datetimev2 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datetimev2(0) to target type=array") } test { @@ -109,67 +109,67 @@ suite("test_nested_types_insert_into_with_unique_table", "p0") { // test action for scala to array with array-scala type test { sql "insert into tbl_array_nested_types_mor2 (c_bool) select c_bool from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type BOOLEAN to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type boolean to target type=array>") } test { sql "insert into tbl_array_nested_types_mor2 (c_tinyint) select c_tinyint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type TINYINT to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type tinyint to target type=array>") } test { sql "insert into tbl_array_nested_types_mor2 (c_smallint) select c_smallint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type SMALLINT to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type smallint to target type=array>") } test { sql "insert into tbl_array_nested_types_mor2 (c_int) select c_int from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type INT to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type int to target type=array>") } test { sql "insert into tbl_array_nested_types_mor2 (c_largeint) select c_largeint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type LARGEINT to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type largeint to target type=array>") } test { sql "insert into tbl_array_nested_types_mor2 (c_float) select c_float from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type FLOAT to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type float to target type=array>") } test { sql "insert into tbl_array_nested_types_mor2 (c_double) select c_double from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DOUBLE to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type double to target type=array>") } test { sql "insert into tbl_array_nested_types_mor2 (c_decimal) select c_decimal from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type decimalv3(20,3) to target type=array>") } test { sql "insert into tbl_array_nested_types_mor2 (c_decimalv3) select c_decimalv3 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type decimalv3(20,3) to target type=array>") } test { sql "insert into tbl_array_nested_types_mor2 (c_date) select c_date from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datev2 to target type=array>") } test { sql "insert into tbl_array_nested_types_mor2 (c_datetime) select c_datetime from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datetimev2(0) to target type=array>") } test { sql "insert into tbl_array_nested_types_mor2 (c_datev2) select c_datev2 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datev2 to target type=array>") } test { sql "insert into tbl_array_nested_types_mor2 (c_datetimev2) select c_datetimev2 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datetimev2(0) to target type=array>") } test { @@ -193,67 +193,67 @@ suite("test_nested_types_insert_into_with_unique_table", "p0") { // test action for scala to map with map-scala-scala type test { sql "insert into tbl_map_types_mor (c_bool) select c_bool from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type BOOLEAN to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type boolean to target type=map") } test { sql "insert into tbl_map_types_mor (c_tinyint) select c_tinyint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type TINYINT to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type tinyint to target type=map") } test { sql "insert into tbl_map_types_mor (c_smallint) select c_smallint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type SMALLINT to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type smallint to target type=map") } test { sql "insert into tbl_map_types_mor (c_int) select c_int from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type INT to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type int to target type=map") } test { sql "insert into tbl_map_types_mor (c_largeint) select c_largeint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type LARGEINT to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type largeint to target type=map") } test { sql "insert into tbl_map_types_mor (c_float) select c_float from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type FLOAT to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type float to target type=map") } test { sql "insert into tbl_map_types_mor (c_double) select c_double from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DOUBLE to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type double to target type=map") } test { sql "insert into tbl_map_types_mor (c_decimal) select c_decimal from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type decimalv3(20,3) to target type=map") } test { sql "insert into tbl_map_types_mor (c_decimalv3) select c_decimalv3 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type decimalv3(20,3) to target type=map") } test { sql "insert into tbl_map_types_mor (c_date) select c_date from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datev2 to target type=map") } test { sql "insert into tbl_map_types_mor (c_datetime) select c_datetime from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datetimev2(0) to target type=map") } test { sql "insert into tbl_map_types_mor (c_datev2) select c_datev2 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datev2 to target type=map") } test { sql "insert into tbl_map_types_mor (c_datetimev2) select c_datetimev2 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datetimev2(0) to target type=map") } test { @@ -276,67 +276,67 @@ suite("test_nested_types_insert_into_with_unique_table", "p0") { // test action for scala to array with map-scala-scala type test { sql "insert into tbl_array_map_types_mor (c_bool) select c_bool from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type BOOLEAN to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type boolean to target type=array>") } test { sql "insert into tbl_array_map_types_mor (c_tinyint) select c_tinyint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type TINYINT to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type tinyint to target type=array>") } test { sql "insert into tbl_array_map_types_mor (c_smallint) select c_smallint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type SMALLINT to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type smallint to target type=array>") } test { sql "insert into tbl_array_map_types_mor (c_int) select c_int from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type INT to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type int to target type=array>") } test { sql "insert into tbl_array_map_types_mor (c_largeint) select c_largeint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type LARGEINT to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type largeint to target type=array>") } test { sql "insert into tbl_array_map_types_mor (c_float) select c_float from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type FLOAT to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type float to target type=array>") } test { sql "insert into tbl_array_map_types_mor (c_double) select c_double from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DOUBLE to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type double to target type=array>") } test { sql "insert into tbl_array_map_types_mor (c_decimal) select c_decimal from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type decimalv3(20,3) to target type=array>") } test { sql "insert into tbl_array_map_types_mor (c_decimalv3) select c_decimalv3 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type decimalv3(20,3) to target type=array>") } test { sql "insert into tbl_array_map_types_mor (c_date) select c_date from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datev2 to target type=array>") } test { sql "insert into tbl_array_map_types_mor (c_datetime) select c_datetime from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datetimev2(0) to target type=array>") } test { sql "insert into tbl_array_map_types_mor (c_datev2) select c_datev2 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datev2 to target type=array>") } test { sql "insert into tbl_array_map_types_mor (c_datetimev2) select c_datetimev2 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datetimev2(0) to target type=array>") } test { @@ -360,67 +360,67 @@ suite("test_nested_types_insert_into_with_unique_table", "p0") { // test action for scala to array with array-scala type test { sql "insert into tbl_map_array_types_mor (c_bool) select c_bool from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type BOOLEAN to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type boolean to target type=map>") } test { sql "insert into tbl_map_array_types_mor (c_tinyint) select c_tinyint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type TINYINT to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type tinyint to target type=map>") } test { sql "insert into tbl_map_array_types_mor (c_smallint) select c_smallint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type SMALLINT to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type smallint to target type=map>") } test { sql "insert into tbl_map_array_types_mor (c_int) select c_int from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type INT to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type int to target type=map>") } test { sql "insert into tbl_map_array_types_mor (c_largeint) select c_largeint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type LARGEINT to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type largeint to target type=map>") } test { sql "insert into tbl_map_array_types_mor (c_float) select c_float from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type FLOAT to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type float to target type=map>") } test { sql "insert into tbl_map_array_types_mor (c_double) select c_double from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DOUBLE to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type double to target type=map>") } test { sql "insert into tbl_map_array_types_mor (c_decimal) select c_decimal from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type decimalv3(20,3) to target type=map>") } test { sql "insert into tbl_map_array_types_mor (c_decimalv3) select c_decimalv3 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type decimalv3(20,3) to target type=map>") } test { sql "insert into tbl_map_array_types_mor (c_date) select c_date from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datev2 to target type=map>") } test { sql "insert into tbl_map_array_types_mor (c_datetime) select c_datetime from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datetimev2(0) to target type=map>") } test { sql "insert into tbl_map_array_types_mor (c_datev2) select c_datev2 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datev2 to target type=map>") } test { sql "insert into tbl_map_array_types_mor (c_datetimev2) select c_datetimev2 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datetimev2(0) to target type=map>") } test { @@ -444,67 +444,67 @@ suite("test_nested_types_insert_into_with_unique_table", "p0") { // mow table test test { sql "insert into tbl_array_nested_types_mow (c_bool) select c_bool from tbl_scalar_types_dup" - exception "java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type BOOLEAN to target type=ARRAY" + exception "java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type boolean to target type=array" } test { sql "insert into tbl_array_nested_types_mow (c_tinyint) select c_tinyint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type TINYINT to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type tinyint to target type=array") } test { sql "insert into tbl_array_nested_types_mow (c_smallint) select c_smallint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type SMALLINT to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type smallint to target type=array") } test { sql "insert into tbl_array_nested_types_mow (c_int) select c_int from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type INT to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type int to target type=array") } test { sql "insert into tbl_array_nested_types_mow (c_largeint) select c_largeint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type LARGEINT to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type largeint to target type=array") } test { sql "insert into tbl_array_nested_types_mow (c_float) select c_float from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type FLOAT to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type float to target type=array") } test { sql "insert into tbl_array_nested_types_mow (c_double) select c_double from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DOUBLE to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type double to target type=array") } test { sql "insert into tbl_array_nested_types_mow (c_decimal) select c_decimal from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type decimalv3(20,3) to target type=array") } test { sql "insert into tbl_array_nested_types_mow (c_decimalv3) select c_decimalv3 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type decimalv3(20,3) to target type=array") } test { sql "insert into tbl_array_nested_types_mow (c_date) select c_date from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datev2 to target type=array") } test { sql "insert into tbl_array_nested_types_mow (c_datetime) select c_datetime from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datetimev2(0) to target type=array") } test { sql "insert into tbl_array_nested_types_mow (c_datev2) select c_datev2 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datev2 to target type=array") } test { sql "insert into tbl_array_nested_types_mow (c_datetimev2) select c_datetimev2 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datetimev2(0) to target type=array") } test { @@ -527,67 +527,67 @@ suite("test_nested_types_insert_into_with_unique_table", "p0") { // test action for scala to array with array-scala type test { sql "insert into tbl_array_nested_types_mow2 (c_bool) select c_bool from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type BOOLEAN to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type boolean to target type=array>") } test { sql "insert into tbl_array_nested_types_mow2 (c_tinyint) select c_tinyint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type TINYINT to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type tinyint to target type=array>") } test { sql "insert into tbl_array_nested_types_mow2 (c_smallint) select c_smallint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type SMALLINT to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type smallint to target type=array>") } test { sql "insert into tbl_array_nested_types_mow2 (c_int) select c_int from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type INT to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type int to target type=array>") } test { sql "insert into tbl_array_nested_types_mow2 (c_largeint) select c_largeint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type LARGEINT to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type largeint to target type=array>") } test { sql "insert into tbl_array_nested_types_mow2 (c_float) select c_float from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type FLOAT to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type float to target type=array>") } test { sql "insert into tbl_array_nested_types_mow2 (c_double) select c_double from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DOUBLE to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type double to target type=array>") } test { sql "insert into tbl_array_nested_types_mow2 (c_decimal) select c_decimal from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type decimalv3(20,3) to target type=array>") } test { sql "insert into tbl_array_nested_types_mow2 (c_decimalv3) select c_decimalv3 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type decimalv3(20,3) to target type=array>") } test { sql "insert into tbl_array_nested_types_mow2 (c_date) select c_date from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datev2 to target type=array>") } test { sql "insert into tbl_array_nested_types_mow2 (c_datetime) select c_datetime from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datetimev2(0) to target type=array>") } test { sql "insert into tbl_array_nested_types_mow2 (c_datev2) select c_datev2 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datev2 to target type=array>") } test { sql "insert into tbl_array_nested_types_mow2 (c_datetimev2) select c_datetimev2 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datetimev2(0) to target type=array>") } test { @@ -611,67 +611,67 @@ suite("test_nested_types_insert_into_with_unique_table", "p0") { // test action for scala to map with map-scala-scala type test { sql "insert into tbl_map_types_mow (c_bool) select c_bool from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type BOOLEAN to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type boolean to target type=map") } test { sql "insert into tbl_map_types_mow (c_tinyint) select c_tinyint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type TINYINT to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type tinyint to target type=map") } test { sql "insert into tbl_map_types_mow (c_smallint) select c_smallint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type SMALLINT to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type smallint to target type=map") } test { sql "insert into tbl_map_types_mow (c_int) select c_int from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type INT to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type int to target type=map") } test { sql "insert into tbl_map_types_mow (c_largeint) select c_largeint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type LARGEINT to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type largeint to target type=map") } test { sql "insert into tbl_map_types_mow (c_float) select c_float from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type FLOAT to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type float to target type=map") } test { sql "insert into tbl_map_types_mow (c_double) select c_double from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DOUBLE to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type double to target type=map") } test { sql "insert into tbl_map_types_mow (c_decimal) select c_decimal from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type decimalv3(20,3) to target type=map") } test { sql "insert into tbl_map_types_mow (c_decimalv3) select c_decimalv3 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type decimalv3(20,3) to target type=map") } test { sql "insert into tbl_map_types_mow (c_date) select c_date from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datev2 to target type=map") } test { sql "insert into tbl_map_types_mow (c_datetime) select c_datetime from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datetimev2(0) to target type=map") } test { sql "insert into tbl_map_types_mow (c_datev2) select c_datev2 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datev2 to target type=map") } test { sql "insert into tbl_map_types_mow (c_datetimev2) select c_datetimev2 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datetimev2(0) to target type=map") } test { @@ -694,67 +694,67 @@ suite("test_nested_types_insert_into_with_unique_table", "p0") { // test action for scala to array with map-scala-scala type test { sql "insert into tbl_array_map_types_mow (c_bool) select c_bool from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type BOOLEAN to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type boolean to target type=array>") } test { sql "insert into tbl_array_map_types_mow (c_tinyint) select c_tinyint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type TINYINT to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type tinyint to target type=array>") } test { sql "insert into tbl_array_map_types_mow (c_smallint) select c_smallint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type SMALLINT to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type smallint to target type=array>") } test { sql "insert into tbl_array_map_types_mow (c_int) select c_int from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type INT to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type int to target type=array>") } test { sql "insert into tbl_array_map_types_mow (c_largeint) select c_largeint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type LARGEINT to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type largeint to target type=array>") } test { sql "insert into tbl_array_map_types_mow (c_float) select c_float from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type FLOAT to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type float to target type=array>") } test { sql "insert into tbl_array_map_types_mow (c_double) select c_double from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DOUBLE to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type double to target type=array>") } test { sql "insert into tbl_array_map_types_mow (c_decimal) select c_decimal from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type decimalv3(20,3) to target type=array>") } test { sql "insert into tbl_array_map_types_mow (c_decimalv3) select c_decimalv3 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type decimalv3(20,3) to target type=array>") } test { sql "insert into tbl_array_map_types_mow (c_date) select c_date from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datev2 to target type=array>") } test { sql "insert into tbl_array_map_types_mow (c_datetime) select c_datetime from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datetimev2(0) to target type=array>") } test { sql "insert into tbl_array_map_types_mow (c_datev2) select c_datev2 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datev2 to target type=array>") } test { sql "insert into tbl_array_map_types_mow (c_datetimev2) select c_datetimev2 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=ARRAY>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datetimev2(0) to target type=array>") } test { @@ -778,67 +778,67 @@ suite("test_nested_types_insert_into_with_unique_table", "p0") { // test action for scala to array with array-scala type test { sql "insert into tbl_map_array_types_mow (c_bool) select c_bool from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type BOOLEAN to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type boolean to target type=map>") } test { sql "insert into tbl_map_array_types_mow (c_tinyint) select c_tinyint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type TINYINT to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type tinyint to target type=map>") } test { sql "insert into tbl_map_array_types_mow (c_smallint) select c_smallint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type SMALLINT to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type smallint to target type=map>") } test { sql "insert into tbl_map_array_types_mow (c_int) select c_int from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type INT to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type int to target type=map>") } test { sql "insert into tbl_map_array_types_mow (c_largeint) select c_largeint from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type LARGEINT to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type largeint to target type=map>") } test { sql "insert into tbl_map_array_types_mow (c_float) select c_float from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type FLOAT to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type float to target type=map>") } test { sql "insert into tbl_map_array_types_mow (c_double) select c_double from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DOUBLE to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type double to target type=map>") } test { sql "insert into tbl_map_array_types_mow (c_decimal) select c_decimal from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type decimalv3(20,3) to target type=map>") } test { sql "insert into tbl_map_array_types_mow (c_decimalv3) select c_decimalv3 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DECIMALV3(20, 3) to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type decimalv3(20,3) to target type=map>") } test { sql "insert into tbl_map_array_types_mow (c_date) select c_date from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datev2 to target type=map>") } test { sql "insert into tbl_map_array_types_mow (c_datetime) select c_datetime from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datetimev2(0) to target type=map>") } test { sql "insert into tbl_map_array_types_mow (c_datev2) select c_datev2 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATEV2 to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datev2 to target type=map>") } test { sql "insert into tbl_map_array_types_mow (c_datetimev2) select c_datetimev2 from tbl_scalar_types_dup" - exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type DATETIMEV2(0) to target type=MAP>") + exception("java.sql.SQLException: errCode = 2, detailMessage = can not cast from origin type datetimev2(0) to target type=map>") } test { diff --git a/regression-test/suites/delete_p0/test_array_column_delete.groovy b/regression-test/suites/delete_p0/test_array_column_delete.groovy index 442b4f5995765b..06c6f122a49ff0 100644 --- a/regression-test/suites/delete_p0/test_array_column_delete.groovy +++ b/regression-test/suites/delete_p0/test_array_column_delete.groovy @@ -23,7 +23,7 @@ suite("test_array_column_delete") { sql """ insert into ${tableName} values(1, NULL),(2,[12,3]),(3,[]),(4,NULL),(5,NULL) """ test { sql """ DELETE FROM ${tableName} WHERE c_array is NULL """ - exception("java.sql.SQLException: errCode = 2, detailMessage = errCode = 2, detailMessage = Can not apply delete condition to column type: ARRAY") + exception("java.sql.SQLException: errCode = 2, detailMessage = errCode = 2, detailMessage = Can not apply delete condition to column type: array") } sql """ DELETE FROM ${tableName} WHERE id = 1; """ qt_sql """ SELECT * FROM ${tableName} order by id """ diff --git a/regression-test/suites/delete_p0/test_map_column_delete.groovy b/regression-test/suites/delete_p0/test_map_column_delete.groovy index e82c6885cd56d0..3290f6ca772c4b 100644 --- a/regression-test/suites/delete_p0/test_map_column_delete.groovy +++ b/regression-test/suites/delete_p0/test_map_column_delete.groovy @@ -24,7 +24,7 @@ suite("test_map_column_delete") { sql """ insert into ${tableName} values(1, {1:'a', 2:"doris"}),(2,{}),(3,NULL),(4,NULL),(5,NULL) """ test { sql """ DELETE FROM ${tableName} WHERE m_map is NULL """ - exception("java.sql.SQLException: errCode = 2, detailMessage = errCode = 2, detailMessage = Can not apply delete condition to column type: MAP") + exception("java.sql.SQLException: errCode = 2, detailMessage = errCode = 2, detailMessage = Can not apply delete condition to column type: map") } sql """ DELETE FROM ${tableName} WHERE id = 1; """ qt_sql """ SELECT * FROM ${tableName} order by id """ diff --git a/regression-test/suites/delete_p0/test_struct_column_delete.groovy b/regression-test/suites/delete_p0/test_struct_column_delete.groovy index 26f24837a539ad..4eb9269b576c5e 100644 --- a/regression-test/suites/delete_p0/test_struct_column_delete.groovy +++ b/regression-test/suites/delete_p0/test_struct_column_delete.groovy @@ -23,7 +23,7 @@ suite("test_struct_column_delete") { sql """ insert into ${tableName} values(1, {1, 'a'}),(2,NULL),(3,NULL),(4,NULL),(5,NULL) """ test { sql """ DELETE FROM ${tableName} WHERE s_struct is NULL """ - exception("java.sql.SQLException: errCode = 2, detailMessage = errCode = 2, detailMessage = Can not apply delete condition to column type: STRUCT") + exception("java.sql.SQLException: errCode = 2, detailMessage = errCode = 2, detailMessage = Can not apply delete condition to column type: struct") } sql """ DELETE FROM ${tableName} WHERE id = 1; """ qt_sql """ SELECT * FROM ${tableName} order by id """ diff --git a/regression-test/suites/nereids_p0/datatype/test_cast.groovy b/regression-test/suites/nereids_p0/datatype/test_cast.groovy index 73eee81cd05dcc..945695109ae69f 100644 --- a/regression-test/suites/nereids_p0/datatype/test_cast.groovy +++ b/regression-test/suites/nereids_p0/datatype/test_cast.groovy @@ -114,11 +114,11 @@ suite("test_cast") { """ explain { sql """select k0 from table_decimal38_4 union all select k0 from table_decimal27_9;""" - contains """AS DECIMALV3(38, 9)""" + contains """AS decimalv3(38,9)""" } sql """set enable_nereids_planner=false;""" explain { sql """select k0 from table_decimal38_4 union all select k0 from table_decimal27_9;""" - contains """AS DECIMALV3(38, 9)""" + contains """AS decimalv3(38,9)""" } -} \ No newline at end of file +} diff --git a/regression-test/suites/nereids_rules_p0/expression/simplify_arithmetic/test_simplify_arithmetic.groovy b/regression-test/suites/nereids_rules_p0/expression/simplify_arithmetic/test_simplify_arithmetic.groovy index e0abc3f16c8446..bc1fc20ee8fe9b 100644 --- a/regression-test/suites/nereids_rules_p0/expression/simplify_arithmetic/test_simplify_arithmetic.groovy +++ b/regression-test/suites/nereids_rules_p0/expression/simplify_arithmetic/test_simplify_arithmetic.groovy @@ -30,7 +30,7 @@ suite("test_simplify_arithmetic") { explain { sql """ select -3 - (7 + id) from test_simplify_arithmetic""" verbose true - contains """type=BIGINT""" + contains """type=bigint""" } qt_return_type_after_projection_should_be_bigint """ diff --git a/regression-test/suites/nereids_syntax_p0/explain.groovy b/regression-test/suites/nereids_syntax_p0/explain.groovy index 568238c137be46..c38b89fd0518d4 100644 --- a/regression-test/suites/nereids_syntax_p0/explain.groovy +++ b/regression-test/suites/nereids_syntax_p0/explain.groovy @@ -63,7 +63,7 @@ suite("nereids_explain") { when 1>1 then cast(1 as float) else 0.0 end; """ - contains "SlotDescriptor{id=0, col=null, colUniqueId=null, type=DOUBLE, nullable=false}" + contains "SlotDescriptor{id=0, col=null, colUniqueId=null, type=double, nullable=false}" } def explainStr = sql("select sum(if(lo_tax=1,lo_tax,0)) from lineorder where false").toString() diff --git a/regression-test/suites/nereids_syntax_p0/test_simplify_comparison.groovy b/regression-test/suites/nereids_syntax_p0/test_simplify_comparison.groovy index 5b83af29c134f3..70dffc3a1dc8d4 100644 --- a/regression-test/suites/nereids_syntax_p0/test_simplify_comparison.groovy +++ b/regression-test/suites/nereids_syntax_p0/test_simplify_comparison.groovy @@ -99,7 +99,7 @@ suite("test_simplify_comparison") { explain { sql "verbose select * from simple_test_table_t where e = cast(1.1 as double);" - contains "CAST(e[#4] AS DOUBLE) = 1.1" + contains "CAST(e[#4] AS double) = 1.1" } explain { @@ -112,7 +112,7 @@ suite("test_simplify_comparison") { explain { sql "verbose select * from simple_test_table_t where e > cast(1.1 as double);" - contains "CAST(e[#4] AS DOUBLE) > 1.1" + contains "CAST(e[#4] AS double) > 1.1" } explain { @@ -125,7 +125,7 @@ suite("test_simplify_comparison") { explain { sql "verbose select * from simple_test_table_t where e < cast(1.1 as double);" - contains "CAST(e[#4] AS DOUBLE) < 1.1" + contains "CAST(e[#4] AS double) < 1.1" } explain { @@ -138,7 +138,7 @@ suite("test_simplify_comparison") { explain { sql "verbose select * from simple_test_table_t where e >= cast(1.1 as double);" - contains "CAST(e[#4] AS DOUBLE) >= 1.1" + contains "CAST(e[#4] AS double) >= 1.1" } explain { @@ -151,7 +151,7 @@ suite("test_simplify_comparison") { explain { sql "verbose select * from simple_test_table_t where e <= cast(1.1 as double);" - contains "CAST(e[#4] AS DOUBLE) <= 1.1" + contains "CAST(e[#4] AS double) <= 1.1" } explain { @@ -215,7 +215,7 @@ suite("test_simplify_comparison") { explain { sql "verbose select * from simple_test_table_t where e = 1.1;" - contains "CAST(e[#4] AS DOUBLE) = 1.1" + contains "CAST(e[#4] AS double) = 1.1" } explain { @@ -228,7 +228,7 @@ suite("test_simplify_comparison") { explain { sql "verbose select * from simple_test_table_t where e > 1.1;" - contains "CAST(e[#4] AS DOUBLE) > 1.1" + contains "CAST(e[#4] AS double) > 1.1" } explain { @@ -241,7 +241,7 @@ suite("test_simplify_comparison") { explain { sql "verbose select * from simple_test_table_t where e < 1.1;" - contains "CAST(e[#4] AS DOUBLE) < 1.1" + contains "CAST(e[#4] AS double) < 1.1" } explain { @@ -254,7 +254,7 @@ suite("test_simplify_comparison") { explain { sql "verbose select * from simple_test_table_t where e >= 1.1;" - contains "CAST(e[#4] AS DOUBLE) >= 1.1" + contains "CAST(e[#4] AS double) >= 1.1" } explain { @@ -267,9 +267,9 @@ suite("test_simplify_comparison") { explain { sql "verbose select * from simple_test_table_t where e <= 1.1;" - contains "CAST(e[#4] AS DOUBLE) <= 1.1" + contains "CAST(e[#4] AS double) <= 1.1" } qt_select1 """select * from simple_test_table_t where cast(a as decimal(5,1)) = 10.0;""" qt_select2 """select a.col1, cast(a.col1 as decimal(7,2)) col3, case when a.col1 is null then 15 when cast(a.col1 as decimal(7,2)) < -99997.99 then 18 when cast(a.col1 as decimal(7,2)) < 1.001 then 3 else -55 end col2 from (select 1 as col1) a;""" -} \ No newline at end of file +} diff --git a/regression-test/suites/partition_p0/test_partition_table_err_msg.groovy b/regression-test/suites/partition_p0/test_partition_table_err_msg.groovy index 7099e967822c93..a746b65c150a51 100644 --- a/regression-test/suites/partition_p0/test_partition_table_err_msg.groovy +++ b/regression-test/suites/partition_p0/test_partition_table_err_msg.groovy @@ -129,7 +129,7 @@ suite("test_partition_table_err_msg", "p0") { PARTITION partition_d VALUES LESS THAN ("3000") ) DISTRIBUTED BY HASH(k1) BUCKETS 13 """ - exception "Invalid range value format: errCode = 2, detailMessage = Number out of range[3000]. type: TINYINT" + exception "Invalid range value format: errCode = 2, detailMessage = Number out of range[3000]. type: tinyint" } test { sql """ diff --git a/regression-test/suites/rollup_p0/test_materialized_view_array.groovy b/regression-test/suites/rollup_p0/test_materialized_view_array.groovy index a4acde9294691e..dad735a76ce61e 100644 --- a/regression-test/suites/rollup_p0/test_materialized_view_array.groovy +++ b/regression-test/suites/rollup_p0/test_materialized_view_array.groovy @@ -67,7 +67,7 @@ suite("test_materialized_view_array", "rollup") { create_test_table.call(tableName) test { sql "CREATE MATERIALIZED VIEW idx AS select k2,k1, k3, k4, k5 from ${tableName}" - exception "errCode = 2, detailMessage = The ARRAY column[`mv_k2` ARRAY NULL] not support to create materialized view" + exception "errCode = 2, detailMessage = The ARRAY column[`mv_k2` array NULL] not support to create materialized view" } } finally { try_sql("DROP TABLE IF EXISTS ${tableName}") diff --git a/regression-test/suites/rollup_p0/test_materialized_view_struct.groovy b/regression-test/suites/rollup_p0/test_materialized_view_struct.groovy index b44500af811d76..61e8415cacc68b 100644 --- a/regression-test/suites/rollup_p0/test_materialized_view_struct.groovy +++ b/regression-test/suites/rollup_p0/test_materialized_view_struct.groovy @@ -59,7 +59,7 @@ suite("test_materialized_view_struct", "rollup") { create_test_table.call(tableName) test { sql "CREATE MATERIALIZED VIEW idx AS select k2,k1, k3, k4, k5 from ${tableName}" - exception "errCode = 2, detailMessage = The STRUCT column[`mv_k2` STRUCT NULL] not support to create materialized view" + exception "errCode = 2, detailMessage = The STRUCT column[`mv_k2` struct NULL] not support to create materialized view" } } finally { try_sql("DROP TABLE IF EXISTS ${tableName}") diff --git a/regression-test/suites/statistics/test_analyze_mv.groovy b/regression-test/suites/statistics/test_analyze_mv.groovy index 07fe0b2591c63a..60284ef8bc40bb 100644 --- a/regression-test/suites/statistics/test_analyze_mv.groovy +++ b/regression-test/suites/statistics/test_analyze_mv.groovy @@ -206,9 +206,9 @@ suite("test_analyze_mv") { verify_column_stats(result_all, result_sample[1]) verify_column_stats(result_all_cached, result_sample[1]) - result_sample = sql """show column stats mvTestDup(`mva_SUM__CAST(``value1`` AS BIGINT)`)""" + result_sample = sql """show column stats mvTestDup(`mva_SUM__CAST(``value1`` AS bigint)`)""" assertEquals(1, result_sample.size()) - assertEquals("mva_SUM__CAST(`value1` AS BIGINT)", result_sample[0][0]) + assertEquals("mva_SUM__CAST(`value1` AS bigint)", result_sample[0][0]) assertEquals("mv3", result_sample[0][1]) assertEquals("4.0", result_sample[0][2]) assertEquals("4.0", result_sample[0][3]) @@ -538,16 +538,16 @@ suite("test_analyze_mv") { assertEquals("SAMPLE", result_sample[0][9]) assertEquals("MANUAL", result_sample[0][11]) - result_sample = sql """show column stats mvTestDup(`mva_SUM__CAST(``value1`` AS BIGINT)`)""" + result_sample = sql """show column stats mvTestDup(`mva_SUM__CAST(``value1`` AS bigint)`)""" logger.info("result " + result_sample) if ("MANUAL" != result_sample[0][11]) { logger.info("Overwrite by auto analyze, analyze it again.") sql """analyze table mvTestDup with sync with sample rows 4000000""" - result_sample = sql """show column stats mvTestDup(`mva_SUM__CAST(``value1`` AS BIGINT)`)""" + result_sample = sql """show column stats mvTestDup(`mva_SUM__CAST(``value1`` AS bigint)`)""" logger.info("result after reanalyze " + result_sample) } assertEquals(1, result_sample.size()) - assertEquals("mva_SUM__CAST(`value1` AS BIGINT)", result_sample[0][0]) + assertEquals("mva_SUM__CAST(`value1` AS bigint)", result_sample[0][0]) assertEquals("mv3", result_sample[0][1]) assertEquals("4.0", result_sample[0][2]) assertEquals("4.0", result_sample[0][3]) @@ -615,13 +615,13 @@ suite("test_analyze_mv") { verifyTaskStatus(result_sample, "mv_key2", "mv3") verifyTaskStatus(result_sample, "mva_MAX__`value2`", "mv3") verifyTaskStatus(result_sample, "mva_MIN__`value3`", "mv3") - verifyTaskStatus(result_sample, "mva_SUM__CAST(`value1` AS BIGINT)", "mv3") + verifyTaskStatus(result_sample, "mva_SUM__CAST(`value1` AS bigint)", "mv3") // Test alter column stats sql """drop stats mvTestDup""" sql """alter table mvTestDup modify column key1 set stats ('ndv'='1', 'num_nulls'='1', 'min_value'='10', 'max_value'='40', 'row_count'='50');""" sql """alter table mvTestDup index mv3 modify column mv_key1 set stats ('ndv'='5', 'num_nulls'='0', 'min_value'='0', 'max_value'='4', 'row_count'='5');""" - sql """alter table mvTestDup index mv3 modify column `mva_SUM__CAST(``value1`` AS BIGINT)` set stats ('ndv'='10', 'num_nulls'='2', 'min_value'='1', 'max_value'='5', 'row_count'='11');""" + sql """alter table mvTestDup index mv3 modify column `mva_SUM__CAST(``value1`` AS bigint)` set stats ('ndv'='10', 'num_nulls'='2', 'min_value'='1', 'max_value'='5', 'row_count'='11');""" def result = sql """show column cached stats mvTestDup(key1)""" assertEquals(1, result.size()) @@ -647,9 +647,9 @@ suite("test_analyze_mv") { assertEquals("0", result[0][7]) assertEquals("4", result[0][8]) - result = sql """show column cached stats mvTestDup(`mva_SUM__CAST(``value1`` AS BIGINT)`)""" + result = sql """show column cached stats mvTestDup(`mva_SUM__CAST(``value1`` AS bigint)`)""" assertEquals(1, result.size()) - assertEquals("mva_SUM__CAST(`value1` AS BIGINT)", result[0][0]) + assertEquals("mva_SUM__CAST(`value1` AS bigint)", result[0][0]) assertEquals("mv3", result[0][1]) assertEquals("11.0", result[0][2]) assertEquals("10.0", result[0][3])