This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch branch-2.1 in repository https://gitbox.apache.org/repos/asf/doris.git
commit 716c14675056e2b180138aa6ad913d5ccee66ef6 Author: slothever <18522955+w...@users.noreply.github.com> AuthorDate: Thu Mar 28 19:08:36 2024 +0800 [fix](insert)fix hive external return msgs and exception and pass all columns to BE (#32824) [fix](insert)fix hive external return msgs and exception and pass all columns to BE --- .../doris/nereids/parser/PartitionTableInfo.java | 7 +- .../trees/plans/commands/info/CreateTableInfo.java | 35 +- .../plans/commands/insert/HiveInsertExecutor.java | 22 +- .../commands/insert/InsertIntoTableCommand.java | 5 + .../org/apache/doris/planner/HiveTableSink.java | 10 +- .../java/org/apache/doris/qe/StmtExecutor.java | 8 +- .../datasource/hive/HiveDDLAndDMLPlanTest.java | 12 +- gensrc/thrift/DataSinks.thrift | 3 +- .../hive/write/test_hive_write_insert.out | 66 ++ .../hive/write/test_hive_write_partitions.out | 50 ++ .../pipeline/external/conf/regression-conf.groovy | 1 + .../pipeline/p0/conf/regression-conf.groovy | 1 + .../hive/write/test_hive_write_insert.groovy | 786 ++++++++++----------- .../hive/write/test_hive_write_partitions.groovy | 3 +- 14 files changed, 573 insertions(+), 436 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/parser/PartitionTableInfo.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/parser/PartitionTableInfo.java index 3256effdc3f..fcf35b739c4 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/parser/PartitionTableInfo.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/parser/PartitionTableInfo.java @@ -119,7 +119,8 @@ public class PartitionTableInfo { && partitionDefs.stream().allMatch(p -> p instanceof InPartition); } - private void validatePartitionColumn(ColumnDefinition column, ConnectContext ctx, boolean isEnableMergeOnWrite) { + private void validatePartitionColumn(ColumnDefinition column, ConnectContext ctx, + boolean isEnableMergeOnWrite, boolean isExternal) { if (!column.isKey() && (!column.getAggType().equals(AggregateType.NONE) || isEnableMergeOnWrite)) { throw new AnalysisException("The partition column could not be aggregated column"); @@ -127,7 +128,7 @@ public class PartitionTableInfo { if (column.getType().isFloatLikeType()) { throw new AnalysisException("Floating point type column can not be partition column"); } - if (column.getType().isStringType()) { + if (column.getType().isStringType() && !isExternal) { throw new AnalysisException("String Type should not be used in partition column[" + column.getName() + "]."); } @@ -173,7 +174,7 @@ public class PartitionTableInfo { throw new AnalysisException( String.format("partition key %s is not exists", p)); } - validatePartitionColumn(columnMap.get(p), ctx, isEnableMergeOnWrite); + validatePartitionColumn(columnMap.get(p), ctx, isEnableMergeOnWrite, isExternal); }); Set<String> partitionColumnSets = Sets.newHashSet(); diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/info/CreateTableInfo.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/info/CreateTableInfo.java index 07c55ca9af1..d2b6a1fd31d 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/info/CreateTableInfo.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/info/CreateTableInfo.java @@ -251,6 +251,18 @@ public class CreateTableInfo { + "please use `DECIMALV3`."); } } + // check duplicated columns + Map<String, ColumnDefinition> columnMap = new TreeMap<>(String.CASE_INSENSITIVE_ORDER); + columns.forEach(c -> { + if (columnMap.put(c.getName(), c) != null) { + try { + ErrorReport.reportAnalysisException(ErrorCode.ERR_DUP_FIELDNAME, + c.getName()); + } catch (Exception e) { + throw new AnalysisException(e.getMessage(), e.getCause()); + } + } + }); if (engineName.equalsIgnoreCase("olap")) { properties = PropertyAnalyzer.rewriteReplicaAllocationProperties(ctlName, dbName, @@ -413,19 +425,6 @@ public class CreateTableInfo { } } - // validate partitions - Map<String, ColumnDefinition> columnMap = new TreeMap<>(String.CASE_INSENSITIVE_ORDER); - columns.forEach(c -> { - if (columnMap.put(c.getName(), c) != null) { - try { - ErrorReport.reportAnalysisException(ErrorCode.ERR_DUP_FIELDNAME, - c.getName()); - } catch (Exception e) { - throw new AnalysisException(e.getMessage(), e.getCause()); - } - } - }); - // validate partition partitionTableInfo.extractPartitionColumns(); partitionTableInfo.validatePartitionInfo(columnMap, properties, ctx, isEnableMergeOnWrite, isExternal); @@ -467,9 +466,17 @@ public class CreateTableInfo { "Iceberg doesn't support 'DISTRIBUTE BY', " + "and you can use 'bucket(num, column)' in 'PARTITIONED BY'."); } - for (ColumnDefinition columnDef : columns) { + if (!columnDef.isNullable() + && engineName.equalsIgnoreCase("hive")) { + throw new AnalysisException(engineName + " catalog doesn't support column with 'NOT NULL'."); + } columnDef.setIsKey(true); + columnDef.setAggType(AggregateType.NONE); + } + // TODO: support iceberg partition check + if (engineName.equalsIgnoreCase("hive")) { + partitionTableInfo.validatePartitionInfo(columnMap, properties, ctx, false, true); } } diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/HiveInsertExecutor.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/HiveInsertExecutor.java index b054a8b5878..76976165526 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/HiveInsertExecutor.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/HiveInsertExecutor.java @@ -95,6 +95,7 @@ public class HiveInsertExecutor extends AbstractInsertExecutor { } else { // TODO use transaction List<THivePartitionUpdate> ups = coordinator.getHivePartitionUpdates(); + loadedRows = ups.stream().mapToLong(THivePartitionUpdate::getRowCount).sum(); ExternalCatalog catalog = ((HMSExternalTable) table).getCatalog(); ExternalMetadataOps metadataOps = catalog.getMetadataOps(); ((HiveMetadataOps) metadataOps).commit(((HMSExternalTable) table).getDbName(), table.getName(), ups); @@ -108,18 +109,33 @@ public class HiveInsertExecutor extends AbstractInsertExecutor { String queryId = DebugUtil.printId(ctx.queryId()); // if any throwable being thrown during insert operation, first we should abort this txn LOG.warn("insert [{}] with query id {} failed", labelName, queryId, t); + StringBuilder sb = new StringBuilder(t.getMessage()); if (txnId != INVALID_TXN_ID) { LOG.warn("insert [{}] with query id {} abort txn {} failed", labelName, queryId, txnId); - StringBuilder sb = new StringBuilder(t.getMessage()); if (!Strings.isNullOrEmpty(coordinator.getTrackingUrl())) { sb.append(". url: ").append(coordinator.getTrackingUrl()); } - ctx.getState().setError(ErrorCode.ERR_UNKNOWN_ERROR, sb.toString()); } + ctx.getState().setError(ErrorCode.ERR_UNKNOWN_ERROR, t.getMessage()); } @Override protected void afterExec(StmtExecutor executor) { - // TODO: set THivePartitionUpdate + StringBuilder sb = new StringBuilder(); + sb.append("{"); + sb.append("'status':'") + .append(ctx.isTxnModel() ? TransactionStatus.PREPARE.name() : txnStatus.name()); + // sb.append("', 'txnId':'").append(txnId).append("'"); + if (!Strings.isNullOrEmpty(errMsg)) { + sb.append(", 'err':'").append(errMsg).append("'"); + } + sb.append("}"); + ctx.getState().setOk(loadedRows, 0, sb.toString()); + // set insert result in connection context, + // so that user can use `show insert result` to get info of the last insert operation. + ctx.setOrUpdateInsertResult(txnId, labelName, database.getFullName(), table.getName(), + txnStatus, loadedRows, 0); + // update it, so that user can get loaded rows in fe.audit.log + ctx.updateReturnRows((int) loadedRows); } } diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/InsertIntoTableCommand.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/InsertIntoTableCommand.java index 8bf454f0980..3cfd40cabb6 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/InsertIntoTableCommand.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/InsertIntoTableCommand.java @@ -27,6 +27,7 @@ import org.apache.doris.datasource.hive.HMSExternalTable; import org.apache.doris.load.loadv2.LoadStatistic; import org.apache.doris.mysql.privilege.PrivPredicate; import org.apache.doris.nereids.NereidsPlanner; +import org.apache.doris.nereids.analyzer.UnboundTableSink; import org.apache.doris.nereids.exceptions.AnalysisException; import org.apache.doris.nereids.glue.LogicalPlanAdapter; import org.apache.doris.nereids.trees.plans.Explainable; @@ -197,6 +198,10 @@ public class InsertIntoTableCommand extends Command implements ForwardWithSync, insertExecutor.executeSingleInsert(executor, jobId); } + public boolean isExternalTableSink() { + return !(logicalQuery instanceof UnboundTableSink); + } + @Override public Plan getExplainPlan(ConnectContext ctx) { return InsertUtils.getPlanForExplain(ctx, this.logicalQuery); diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/HiveTableSink.java b/fe/fe-core/src/main/java/org/apache/doris/planner/HiveTableSink.java index c2debe3a4af..a4fa1d11cb0 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/planner/HiveTableSink.java +++ b/fe/fe-core/src/main/java/org/apache/doris/planner/HiveTableSink.java @@ -87,7 +87,6 @@ public class HiveTableSink extends DataSink { /** * check sink params and generate thrift data sink to BE - * @param insertCols target table columns * @param insertCtx insert info context * @throws AnalysisException if source file format cannot be read */ @@ -97,22 +96,19 @@ public class HiveTableSink extends DataSink { tSink.setDbName(targetTable.getDbName()); tSink.setTableName(targetTable.getName()); Set<String> partNames = new HashSet<>(targetTable.getPartitionColumnNames()); - Set<String> colNames = targetTable.getColumns() - .stream().map(Column::getName) - .collect(Collectors.toSet()); + List<Column> allColumns = targetTable.getColumns(); + Set<String> colNames = allColumns.stream().map(Column::getName).collect(Collectors.toSet()); colNames.removeAll(partNames); List<THiveColumn> targetColumns = new ArrayList<>(); - for (Column col : insertCols) { + for (Column col : allColumns) { if (partNames.contains(col.getName())) { THiveColumn tHiveColumn = new THiveColumn(); tHiveColumn.setName(col.getName()); - tHiveColumn.setDataType(col.getType().toThrift()); tHiveColumn.setColumnType(THiveColumnType.PARTITION_KEY); targetColumns.add(tHiveColumn); } else if (colNames.contains(col.getName())) { THiveColumn tHiveColumn = new THiveColumn(); tHiveColumn.setName(col.getName()); - tHiveColumn.setDataType(col.getType().toThrift()); tHiveColumn.setColumnType(THiveColumnType.REGULAR); targetColumns.add(tHiveColumn); } diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java b/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java index a52ed1c260e..b07447a0e91 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java +++ b/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java @@ -515,12 +515,18 @@ public class StmtExecutor { // 2. insert into command because some nereids cases fail (including case1) // Skip force fallback for: // 1. Transaction insert because nereids support `insert into select` while legacy does not + // 2. Nereids support insert into external table while legacy does not boolean isInsertCommand = parsedStmt != null && parsedStmt instanceof LogicalPlanAdapter && ((LogicalPlanAdapter) parsedStmt).getLogicalPlan() instanceof InsertIntoTableCommand; /*boolean isGroupCommit = (Config.wait_internal_group_commit_finish || context.sessionVariable.isEnableInsertGroupCommit()) && isInsertCommand;*/ - boolean forceFallback = isInsertCommand && !context.isTxnModel(); + boolean isExternalTableInsert = false; + if (isInsertCommand) { + isExternalTableInsert = ((InsertIntoTableCommand) ((LogicalPlanAdapter) parsedStmt) + .getLogicalPlan()).isExternalTableSink(); + } + boolean forceFallback = isInsertCommand && !isExternalTableInsert && !context.isTxnModel(); if (e instanceof NereidsException && !context.getSessionVariable().enableFallbackToOriginalPlanner && !forceFallback) { LOG.warn("Analyze failed. {}", context.getQueryIdentifier(), e); diff --git a/fe/fe-core/src/test/java/org/apache/doris/datasource/hive/HiveDDLAndDMLPlanTest.java b/fe/fe-core/src/test/java/org/apache/doris/datasource/hive/HiveDDLAndDMLPlanTest.java index 8e2d436e219..1e1fb65a44c 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/datasource/hive/HiveDDLAndDMLPlanTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/datasource/hive/HiveDDLAndDMLPlanTest.java @@ -80,8 +80,8 @@ public class HiveDDLAndDMLPlanTest extends TestWithFeService { // partitioned table String createSourceInterPTable = "CREATE TABLE `part_ctas_olap`(\n" + " `col1` INT COMMENT 'col1',\n" - + " `pt1` VARCHAR COMMENT 'pt1',\n" - + " `pt2` VARCHAR COMMENT 'pt2'\n" + + " `pt1` VARCHAR(16) COMMENT 'pt1',\n" + + " `pt2` VARCHAR(16) COMMENT 'pt2'\n" + ") ENGINE=olap\n" + "PARTITION BY LIST (pt1, pt2) ()\n" + "DISTRIBUTED BY HASH (col1) BUCKETS 16\n" @@ -143,8 +143,8 @@ public class HiveDDLAndDMLPlanTest extends TestWithFeService { // partitioned table String createSourceExtTable = "CREATE TABLE `part_ctas_src`(\n" + " `col1` INT COMMENT 'col1',\n" - + " `pt1` STRING COMMENT 'pt1',\n" - + " `pt2` STRING COMMENT 'pt2'\n" + + " `pt1` VARCHAR COMMENT 'pt1',\n" + + " `pt2` VARCHAR COMMENT 'pt2'\n" + ") ENGINE=hive\n" + "PARTITION BY LIST (pt1, pt2) ()\n" + "PROPERTIES (\n" @@ -211,7 +211,7 @@ public class HiveDDLAndDMLPlanTest extends TestWithFeService { + " `col2` INT COMMENT 'col2',\n" + " `col3` BIGINT COMMENT 'col3',\n" + " `col4` DECIMAL(5,2) COMMENT 'col4',\n" - + " `pt1` STRING COMMENT 'pt1',\n" + + " `pt1` VARCHAR(16) COMMENT 'pt1',\n" + " `pt2` STRING COMMENT 'pt2',\n" + " `col5` DATE COMMENT 'col5',\n" + " `col6` DATETIME COMMENT 'col6'\n" @@ -257,7 +257,7 @@ public class HiveDDLAndDMLPlanTest extends TestWithFeService { + " `col2` INT COMMENT 'col2',\n" + " `col3` BIGINT COMMENT 'col3',\n" + " `col4` DECIMAL(5,2) COMMENT 'col4',\n" - + " `pt1` STRING COMMENT 'pt1',\n" + + " `pt1` VARCHAR(16) COMMENT 'pt1',\n" + " `pt2` STRING COMMENT 'pt2'\n" + ") ENGINE=hive\n" + "PARTITION BY LIST (pt2) ()\n" diff --git a/gensrc/thrift/DataSinks.thrift b/gensrc/thrift/DataSinks.thrift index e7683c25fd4..93de397b27b 100644 --- a/gensrc/thrift/DataSinks.thrift +++ b/gensrc/thrift/DataSinks.thrift @@ -308,8 +308,7 @@ enum THiveColumnType { struct THiveColumn { 1: optional string name - 2: optional Types.TTypeDesc data_type - 3: optional THiveColumnType column_type + 2: optional THiveColumnType column_type } struct THivePartition { diff --git a/regression-test/data/external_table_p0/hive/write/test_hive_write_insert.out b/regression-test/data/external_table_p0/hive/write/test_hive_write_insert.out index 7b5c0e7d7bc..ad359b8cf6f 100644 --- a/regression-test/data/external_table_p0/hive/write/test_hive_write_insert.out +++ b/regression-test/data/external_table_p0/hive/write/test_hive_write_insert.out @@ -22,6 +22,7 @@ false -7 -15 16 -9223372036854775808 -123.45 -123456.789 123456789 -1234.5678 -1 \N \N \N \N \N 123.45 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N {1:10} \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N [1.2345, 2.3456] \N \N \N \N \N \N \N \N \N \N [null, "value1", "value2"] \N \N \N 20240321 -- !q06 -- +\N \N \N \N \N 123.45 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N {1:10} \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N [1.2345, 2.3456] \N \N \N \N \N \N \N \N \N \N [null, "value1", "value2"] \N \N \N 20240321 -- !q01 -- false -128 -32768 -2147483648 -9223372036854775808 -123.45 -123456.789 -123456789 -1234.5678 -123456.789012 -123456789.012345678901 string_value binary_value 2024-03-21 2024-03-21T12:00 2024-03-21T12:00:00.123456 2024-03-21T12:00:00.123456 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"x":"y"} {2:20} {2:200000000000} {2.2:20.2} {2.2:20.2} {0:1} {2.2:2.2} {2.34:2.34} {2.3456:2.3456} {2.34567890:2.34567890} {2.34567890 [...] @@ -53,6 +54,9 @@ true 127 32767 2147483647 9223372036854775807 123.45 123456.789 123456789 1234.5 \N \N \N \N \N 123.45 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N {1:10} \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N [1.2345, 2.3456] \N \N \N \N \N \N \N \N \N \N [null, "value1", "value2"] \N \N \N \N -- !q05 -- +\N \N \N \N \N -123.45 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N {2:20} \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N [3.4567, 4.5678] \N \N \N \N \N \N \N \N \N \N [null, "value1", "value2"] \N \N \N \N +\N \N \N \N \N -123.45 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N {3:20} \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N [8.4567, 4.5678] \N \N \N \N \N \N \N \N \N \N [null, "value1", "value2"] \N \N \N \N +\N \N \N \N \N 123.45 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N {1:10} \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N [1.2345, 2.3456] \N \N \N \N \N \N \N \N \N \N [null, "value1", "value2"] \N \N \N \N -- !q01 -- true 127 32767 2147483647 9223372036854775807 123.45 123456.789 123456789 1234.5678 123456.789012 123456789.012345678901 string_value binary_value 2024-03-20 2024-03-20T12:00 2024-03-20T12:00:00.123457 2024-03-20T12:00:00.123457 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"a":"b"} {1:10} {1:100000000000} {1.1:10.1} {1.1:10.1} {1:0} {1.1:1.1} {1.23:1.23} {1.2345:1.2345} {1.23456789:1.23456789} {1.23456789:1.23456789 [...] @@ -63,12 +67,25 @@ false -128 -32768 -2147483648 -9223372036854775808 -123.45 -123456.789 -12345678 true 127 32767 2147483647 9223372036854775807 123.45 123456.789 123456789 1234.5678 123456.789012 123456789.012345678901 string_value binary_value 2024-03-20 2024-03-20T12:00 2024-03-20T12:00:00.123457 2024-03-20T12:00:00.123457 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"a":"b"} {1:10} {1:100000000000} {1.1:10.1} {1.1:10.1} {1:0} {1.1:1.1} {1.23:1.23} {1.2345:1.2345} {1.23456789:1.23456789} {1.23456789:1.23456789 [...] true 127 32767 2147483647 9223372036854775807 123.45 123456.789 123456789 1234.5678 123456.789012 123456789.012345678901 string_value binary_value 2024-03-20 2024-03-20T12:00 2024-03-20T12:00:00.123457 2024-03-20T12:00:00.123457 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"a":"b"} {1:10} {1:100000000000} {1.1:10.1} {1.1:10.1} {1:0} {1.1:1.1} {1.23:1.23} {1.2345:1.2345} {1.23456789:1.23456789} {1.23456789:1.23456789 [...] +-- !q03 -- +\N \N \N \N \N 123.45 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N {1:10} \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N [1.2345, 2.3456] \N \N \N \N \N \N \N \N \N \N [null, "value1", "value2"] \N \N \N 20240321 +false -128 -32768 -2147483648 -9223372036854775808 -123.45 -123456.789 -123456789 -1234.5678 -123456.789012 -123456789.012345678901 string_value binary_value 2024-03-21 2024-03-21T12:00 2024-03-21T12:00:00.123457 2024-03-21T12:00:00.123457 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"x":"y"} {2:20} {2:200000000000} {2.2:20.2} {2.2:20.2} {0:1} {2.2:2.2} {2.34:2.34} {2.3456:2.3456} {2.34567890:2.34567890} {2.34567890 [...] +false -128 -32768 -2147483648 -9223372036854775808 -123.45 -123456.789 -123456789 -1234.5678 -123456.789012 -123456789.012345678901 string_value binary_value 2024-03-22 2024-03-22T12:00 2024-03-22T12:00:00.123457 2024-03-22T12:00:00.123457 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"x":"y"} {3:20} {3:200000000000} {3.2:20.2} {3.2:20.2} {0:1} {3.2:2.2} {3.34:2.34} {2.3456:2.3456} {2.34567890:2.34567890} {2.34567890 [...] +true 127 32767 2147483647 9223372036854775807 123.45 123456.789 123456789 1234.5678 123456.789012 123456789.012345678901 string_value binary_value 2024-03-20 2024-03-20T12:00 2024-03-20T12:00:00.123457 2024-03-20T12:00:00.123457 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"a":"b"} {1:10} {1:100000000000} {1.1:10.1} {1.1:10.1} {1:0} {1.1:1.1} {1.23:1.23} {1.2345:1.2345} {1.23456789:1.23456789} {1.23456789:1.23456789 [...] +true 127 32767 2147483647 9223372036854775807 123.45 123456.789 123456789 1234.5678 123456.789012 123456789.012345678901 string_value binary_value 2024-03-20 2024-03-20T12:00 2024-03-20T12:00:00.123457 2024-03-20T12:00:00.123457 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"a":"b"} {1:10} {1:100000000000} {1.1:10.1} {1.1:10.1} {1:0} {1.1:1.1} {1.23:1.23} {1.2345:1.2345} {1.23456789:1.23456789} {1.23456789:1.23456789 [...] + -- !q04 -- false -128 -32768 -2147483648 -9223372036854775808 -123.45 -123456.789 -123456789 -1234.5678 -123456.789012 -123456789.012345678901 string_value binary_value 2024-03-22 2024-03-22T12:00 2024-03-22T12:00:00.123457 2024-03-22T12:00:00.123457 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"x":"y"} {3:20} {3:200000000000} {3.2:20.2} {3.2:20.2} {0:1} {3.2:2.2} {3.34:2.34} {2.3456:2.3456} {2.34567890:2.34567890} {2.34567890 [...] false -7 -15 16 -9223372036854775808 -123.45 -123456.789 123456789 -1234.5678 -123456.789012 -123456789.012345678901 str binary_value 2024-03-25 2024-03-25T12:00 2024-03-25T12:00:00.123457 2024-03-25T12:00:00.123457 char_value11111 char_value22222 char_value33333 varchar_value11111 varchar_value22222 varchar_value33333 {"key7":"value1"} {"key7":"value1"} {"x":"y"} {3:20} {3:200000000000} {3.2:20.2} {3.2:20.2} {0:1} {3.2:2.2} {3.34:2.34} {5.3456:2.3456} {5.34567890:2.34567890} {2.34567890 [...] true 127 32767 2147483647 9223372036854775807 123.45 123456.789 123456789 1234.5678 123456.789012 123456789.012345678901 string_value binary_value 2024-03-20 2024-03-20T12:00 2024-03-20T12:00:00.123457 2024-03-20T12:00:00.123457 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"a":"b"} {1:10} {1:100000000000} {1.1:10.1} {1.1:10.1} {1:0} {1.1:1.1} {1.23:1.23} {1.2345:1.2345} {1.23456789:1.23456789} {1.23456789:1.23456789 [...] true 127 32767 2147483647 9223372036854775807 123.45 123456.789 123456789 1234.5678 123456.789012 123456789.012345678901 string_value binary_value 2024-03-20 2024-03-20T12:00 2024-03-20T12:00:00.123457 2024-03-20T12:00:00.123457 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"a":"b"} {1:10} {1:100000000000} {1.1:10.1} {1.1:10.1} {1:0} {1.1:1.1} {1.23:1.23} {1.2345:1.2345} {1.23456789:1.23456789} {1.23456789:1.23456789 [...] +-- !q05 -- +\N \N \N \N \N 123.45 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N {1:10} \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N [1.2345, 2.3456] \N \N \N \N \N \N \N \N \N \N [null, "value1", "value2"] \N \N \N 20240321 +false -128 -32768 -2147483648 -9223372036854775808 -123.45 -123456.789 -123456789 -1234.5678 -123456.789012 -123456789.012345678901 string_value binary_value 2024-03-22 2024-03-22T12:00 2024-03-22T12:00:00.123457 2024-03-22T12:00:00.123457 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"x":"y"} {3:20} {3:200000000000} {3.2:20.2} {3.2:20.2} {0:1} {3.2:2.2} {3.34:2.34} {2.3456:2.3456} {2.34567890:2.34567890} {2.34567890 [...] +true 127 32767 2147483647 9223372036854775807 123.45 123456.789 123456789 1234.5678 123456.789012 123456789.012345678901 string_value binary_value 2024-03-20 2024-03-20T12:00 2024-03-20T12:00:00.123457 2024-03-20T12:00:00.123457 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"a":"b"} {1:10} {1:100000000000} {1.1:10.1} {1.1:10.1} {1:0} {1.1:1.1} {1.23:1.23} {1.2345:1.2345} {1.23456789:1.23456789} {1.23456789:1.23456789 [...] +true 127 32767 2147483647 9223372036854775807 123.45 123456.789 123456789 1234.5678 123456.789012 123456789.012345678901 string_value binary_value 2024-03-20 2024-03-20T12:00 2024-03-20T12:00:00.123457 2024-03-20T12:00:00.123457 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"a":"b"} {1:10} {1:100000000000} {1.1:10.1} {1.1:10.1} {1:0} {1.1:1.1} {1.23:1.23} {1.2345:1.2345} {1.23456789:1.23456789} {1.23456789:1.23456789 [...] + -- !q01 -- false -128 -32768 -2147483648 -9223372036854775808 -123.45 -123456.789 -123456789 -1234.5678 -123456.789012 -123456789.012345678901 string_value binary_value 2024-03-21 2024-03-21T12:00 2024-03-21T12:00:00.123456 2024-03-21T12:00:00.123456 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"x":"y"} {2:20} {2:200000000000} {2.2:20.2} {2.2:20.2} {0:1} {2.2:2.2} {2.34:2.34} {2.3456:2.3456} {2.34567890:2.34567890} {2.34567890 [...] false -128 -32768 -2147483648 -9223372036854775808 -123.45 -123456.789 -123456789 -1234.5678 -123456.789012 -123456789.012345678901 string_value binary_value 2024-03-22 2024-03-22T12:00 2024-03-22T12:00:00.123456 2024-03-22T12:00:00.123456 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"x":"y"} {3:20} {3:200000000000} {3.2:20.2} {3.2:20.2} {0:1} {3.2:2.2} {3.34:2.34} {2.3456:2.3456} {2.34567890:2.34567890} {2.34567890 [...] @@ -82,6 +99,22 @@ false -128 -32768 -2147483648 -9223372036854775808 -123.45 -123456.789 -12345678 true 127 32767 2147483647 9223372036854775807 123.45 123456.789 123456789 1234.5678 123456.789012 123456789.012345678901 string_value binary_value 2024-03-20 2024-03-20T12:00 2024-03-20T12:00:00.123456 2024-03-20T12:00:00.123456 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"a":"b"} {1:10} {1:100000000000} {1.1:10.1} {1.1:10.1} {1:0} {1.1:1.1} {1.23:1.23} {1.2345:1.2345} {1.23456789:1.23456789} {1.23456789:1.23456789 [...] true 127 32767 2147483647 9223372036854775807 123.45 123456.789 123456789 1234.5678 123456.789012 123456789.012345678901 string_value binary_value 2024-03-20 2024-03-20T12:00 2024-03-20T12:00:00.123456 2024-03-20T12:00:00.123456 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"a":"b"} {1:10} {1:100000000000} {1.1:10.1} {1.1:10.1} {1:0} {1.1:1.1} {1.23:1.23} {1.2345:1.2345} {1.23456789:1.23456789} {1.23456789:1.23456789 [...] +-- !q03 -- +\N \N \N \N \N -123.45 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N {2:20} \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N [3.4567, 4.5678] \N \N \N \N \N \N \N \N \N \N [null, "value1", "value2"] \N \N \N 20240321 +\N \N \N \N \N -123.45 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N {3:20} \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N [8.4567, 4.5678] \N \N \N \N \N \N \N \N \N \N [null, "value1", "value2"] \N \N \N 20240322 +\N \N \N \N \N 123.45 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N {1:10} \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N [1.2345, 2.3456] \N \N \N \N \N \N \N \N \N \N [null, "value1", "value2"] \N \N \N 20240320 +false -128 -32768 -2147483648 -9223372036854775808 -123.45 -123456.789 -123456789 -1234.5678 -123456.789012 -123456789.012345678901 string_value binary_value 2024-03-21 2024-03-21T12:00 2024-03-21T12:00:00.123456 2024-03-21T12:00:00.123456 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"x":"y"} {2:20} {2:200000000000} {2.2:20.2} {2.2:20.2} {0:1} {2.2:2.2} {2.34:2.34} {2.3456:2.3456} {2.34567890:2.34567890} {2.34567890 [...] +false -128 -32768 -2147483648 -9223372036854775808 -123.45 -123456.789 -123456789 -1234.5678 -123456.789012 -123456789.012345678901 string_value binary_value 2024-03-21 2024-03-21T12:00 2024-03-21T12:00:00.123456 2024-03-21T12:00:00.123456 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"x":"y"} {2:20} {2:200000000000} {2.2:20.2} {2.2:20.2} {0:1} {2.2:2.2} {2.34:2.34} {2.3456:2.3456} {2.34567890:2.34567890} {2.34567890 [...] +false -128 -32768 -2147483648 -9223372036854775808 -123.45 -123456.789 -123456789 -1234.5678 -123456.789012 -123456789.012345678901 string_value binary_value 2024-03-22 2024-03-22T12:00 2024-03-22T12:00:00.123456 2024-03-22T12:00:00.123456 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"x":"y"} {3:20} {3:200000000000} {3.2:20.2} {3.2:20.2} {0:1} {3.2:2.2} {3.34:2.34} {2.3456:2.3456} {2.34567890:2.34567890} {2.34567890 [...] +false -128 -32768 -2147483648 -9223372036854775808 -123.45 -123456.789 -123456789 -1234.5678 -123456.789012 -123456789.012345678901 string_value binary_value 2024-03-22 2024-03-22T12:00 2024-03-22T12:00:00.123456 2024-03-22T12:00:00.123456 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"x":"y"} {3:20} {3:200000000000} {3.2:20.2} {3.2:20.2} {0:1} {3.2:2.2} {3.34:2.34} {2.3456:2.3456} {2.34567890:2.34567890} {2.34567890 [...] +true 127 32767 2147483647 9223372036854775807 123.45 123456.789 123456789 1234.5678 123456.789012 123456789.012345678901 string_value binary_value 2024-03-20 2024-03-20T12:00 2024-03-20T12:00:00.123456 2024-03-20T12:00:00.123456 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"a":"b"} {1:10} {1:100000000000} {1.1:10.1} {1.1:10.1} {1:0} {1.1:1.1} {1.23:1.23} {1.2345:1.2345} {1.23456789:1.23456789} {1.23456789:1.23456789 [...] +true 127 32767 2147483647 9223372036854775807 123.45 123456.789 123456789 1234.5678 123456.789012 123456789.012345678901 string_value binary_value 2024-03-20 2024-03-20T12:00 2024-03-20T12:00:00.123456 2024-03-20T12:00:00.123456 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"a":"b"} {1:10} {1:100000000000} {1.1:10.1} {1.1:10.1} {1:0} {1.1:1.1} {1.23:1.23} {1.2345:1.2345} {1.23456789:1.23456789} {1.23456789:1.23456789 [...] + +-- !q04 -- +\N \N \N \N \N -123.45 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N {2:20} \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N [3.4567, 4.5678] \N \N \N \N \N \N \N \N \N \N [null, "value1", "value2"] \N \N \N 20240321 +\N \N \N \N \N -123.45 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N {3:20} \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N [8.4567, 4.5678] \N \N \N \N \N \N \N \N \N \N [null, "value1", "value2"] \N \N \N 20240322 +\N \N \N \N \N 123.45 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N {1:10} \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N [1.2345, 2.3456] \N \N \N \N \N \N \N \N \N \N [null, "value1", "value2"] \N \N \N 20240320 + -- !q01 -- true 127 32767 2147483647 9223372036854775807 123.45 123456.789 123456789 1234.5678 123456.789012 123456789.012345678901 string_value binary_value 2024-03-20 2024-03-20T12:00 2024-03-20T12:00:00.123457 2024-03-20T12:00:00.123457 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"a":"b"} {1:10} {1:100000000000} {1.1:10.1} {1.1:10.1} {1:0} {1.1:1.1} {1.23:1.23} {1.2345:1.2345} {1.23456789:1.23456789} {1.23456789:1.23456789 [...] @@ -105,6 +138,7 @@ false -7 -15 16 -9223372036854775808 -123.45 -123456.789 123456789 -1234.5678 -1 \N \N \N \N \N 123.45 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N {1:10} \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N [1.2345, 2.3456] \N \N \N \N \N \N \N \N \N \N [null, "value1", "value2"] \N \N \N 20240321 -- !q06 -- +\N \N \N \N \N 123.45 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N {1:10} \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N [1.2345, 2.3456] \N \N \N \N \N \N \N \N \N \N [null, "value1", "value2"] \N \N \N 20240321 -- !q01 -- false -128 -32768 -2147483648 -9223372036854775808 -123.45 -123456.789 -123456789 -1234.5678 -123456.789012 -123456789.012345678901 string_value binary_value 2024-03-21 2024-03-21T12:00 2024-03-21T12:00:00.123456 2024-03-21T12:00:00.123456 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"x":"y"} {2:20} {2:200000000000} {2.2:20.2} {2.2:20.2} {0:1} {2.2:2.2} {2.34:2.34} {2.3456:2.3456} {2.34567890:2.34567890} {2.34567890 [...] @@ -136,6 +170,9 @@ true 127 32767 2147483647 9223372036854775807 123.45 123456.789 123456789 1234.5 \N \N \N \N \N 123.45 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N {1:10} \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N [1.2345, 2.3456] \N \N \N \N \N \N \N \N \N \N [null, "value1", "value2"] \N \N \N \N -- !q05 -- +\N \N \N \N \N -123.45 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N {2:20} \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N [3.4567, 4.5678] \N \N \N \N \N \N \N \N \N \N [null, "value1", "value2"] \N \N \N \N +\N \N \N \N \N -123.45 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N {3:20} \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N [8.4567, 4.5678] \N \N \N \N \N \N \N \N \N \N [null, "value1", "value2"] \N \N \N \N +\N \N \N \N \N 123.45 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N {1:10} \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N [1.2345, 2.3456] \N \N \N \N \N \N \N \N \N \N [null, "value1", "value2"] \N \N \N \N -- !q01 -- true 127 32767 2147483647 9223372036854775807 123.45 123456.789 123456789 1234.5678 123456.789012 123456789.012345678901 string_value binary_value 2024-03-20 2024-03-20T12:00 2024-03-20T12:00:00.123457 2024-03-20T12:00:00.123457 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"a":"b"} {1:10} {1:100000000000} {1.1:10.1} {1.1:10.1} {1:0} {1.1:1.1} {1.23:1.23} {1.2345:1.2345} {1.23456789:1.23456789} {1.23456789:1.23456789 [...] @@ -146,12 +183,25 @@ false -128 -32768 -2147483648 -9223372036854775808 -123.45 -123456.789 -12345678 true 127 32767 2147483647 9223372036854775807 123.45 123456.789 123456789 1234.5678 123456.789012 123456789.012345678901 string_value binary_value 2024-03-20 2024-03-20T12:00 2024-03-20T12:00:00.123457 2024-03-20T12:00:00.123457 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"a":"b"} {1:10} {1:100000000000} {1.1:10.1} {1.1:10.1} {1:0} {1.1:1.1} {1.23:1.23} {1.2345:1.2345} {1.23456789:1.23456789} {1.23456789:1.23456789 [...] true 127 32767 2147483647 9223372036854775807 123.45 123456.789 123456789 1234.5678 123456.789012 123456789.012345678901 string_value binary_value 2024-03-20 2024-03-20T12:00 2024-03-20T12:00:00.123457 2024-03-20T12:00:00.123457 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"a":"b"} {1:10} {1:100000000000} {1.1:10.1} {1.1:10.1} {1:0} {1.1:1.1} {1.23:1.23} {1.2345:1.2345} {1.23456789:1.23456789} {1.23456789:1.23456789 [...] +-- !q03 -- +\N \N \N \N \N 123.45 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N {1:10} \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N [1.2345, 2.3456] \N \N \N \N \N \N \N \N \N \N [null, "value1", "value2"] \N \N \N 20240321 +false -128 -32768 -2147483648 -9223372036854775808 -123.45 -123456.789 -123456789 -1234.5678 -123456.789012 -123456789.012345678901 string_value binary_value 2024-03-21 2024-03-21T12:00 2024-03-21T12:00:00.123457 2024-03-21T12:00:00.123457 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"x":"y"} {2:20} {2:200000000000} {2.2:20.2} {2.2:20.2} {0:1} {2.2:2.2} {2.34:2.34} {2.3456:2.3456} {2.34567890:2.34567890} {2.34567890 [...] +false -128 -32768 -2147483648 -9223372036854775808 -123.45 -123456.789 -123456789 -1234.5678 -123456.789012 -123456789.012345678901 string_value binary_value 2024-03-22 2024-03-22T12:00 2024-03-22T12:00:00.123457 2024-03-22T12:00:00.123457 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"x":"y"} {3:20} {3:200000000000} {3.2:20.2} {3.2:20.2} {0:1} {3.2:2.2} {3.34:2.34} {2.3456:2.3456} {2.34567890:2.34567890} {2.34567890 [...] +true 127 32767 2147483647 9223372036854775807 123.45 123456.789 123456789 1234.5678 123456.789012 123456789.012345678901 string_value binary_value 2024-03-20 2024-03-20T12:00 2024-03-20T12:00:00.123457 2024-03-20T12:00:00.123457 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"a":"b"} {1:10} {1:100000000000} {1.1:10.1} {1.1:10.1} {1:0} {1.1:1.1} {1.23:1.23} {1.2345:1.2345} {1.23456789:1.23456789} {1.23456789:1.23456789 [...] +true 127 32767 2147483647 9223372036854775807 123.45 123456.789 123456789 1234.5678 123456.789012 123456789.012345678901 string_value binary_value 2024-03-20 2024-03-20T12:00 2024-03-20T12:00:00.123457 2024-03-20T12:00:00.123457 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"a":"b"} {1:10} {1:100000000000} {1.1:10.1} {1.1:10.1} {1:0} {1.1:1.1} {1.23:1.23} {1.2345:1.2345} {1.23456789:1.23456789} {1.23456789:1.23456789 [...] + -- !q04 -- false -128 -32768 -2147483648 -9223372036854775808 -123.45 -123456.789 -123456789 -1234.5678 -123456.789012 -123456789.012345678901 string_value binary_value 2024-03-22 2024-03-22T12:00 2024-03-22T12:00:00.123457 2024-03-22T12:00:00.123457 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"x":"y"} {3:20} {3:200000000000} {3.2:20.2} {3.2:20.2} {0:1} {3.2:2.2} {3.34:2.34} {2.3456:2.3456} {2.34567890:2.34567890} {2.34567890 [...] false -7 -15 16 -9223372036854775808 -123.45 -123456.789 123456789 -1234.5678 -123456.789012 -123456789.012345678901 str binary_value 2024-03-25 2024-03-25T12:00 2024-03-25T12:00:00.123457 2024-03-25T12:00:00.123457 char_value11111 char_value22222 char_value33333 varchar_value11111 varchar_value22222 varchar_value33333 {"key7":"value1"} {"key7":"value1"} {"x":"y"} {3:20} {3:200000000000} {3.2:20.2} {3.2:20.2} {0:1} {3.2:2.2} {3.34:2.34} {5.3456:2.3456} {5.34567890:2.34567890} {2.34567890 [...] true 127 32767 2147483647 9223372036854775807 123.45 123456.789 123456789 1234.5678 123456.789012 123456789.012345678901 string_value binary_value 2024-03-20 2024-03-20T12:00 2024-03-20T12:00:00.123457 2024-03-20T12:00:00.123457 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"a":"b"} {1:10} {1:100000000000} {1.1:10.1} {1.1:10.1} {1:0} {1.1:1.1} {1.23:1.23} {1.2345:1.2345} {1.23456789:1.23456789} {1.23456789:1.23456789 [...] true 127 32767 2147483647 9223372036854775807 123.45 123456.789 123456789 1234.5678 123456.789012 123456789.012345678901 string_value binary_value 2024-03-20 2024-03-20T12:00 2024-03-20T12:00:00.123457 2024-03-20T12:00:00.123457 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"a":"b"} {1:10} {1:100000000000} {1.1:10.1} {1.1:10.1} {1:0} {1.1:1.1} {1.23:1.23} {1.2345:1.2345} {1.23456789:1.23456789} {1.23456789:1.23456789 [...] +-- !q05 -- +\N \N \N \N \N 123.45 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N {1:10} \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N [1.2345, 2.3456] \N \N \N \N \N \N \N \N \N \N [null, "value1", "value2"] \N \N \N 20240321 +false -128 -32768 -2147483648 -9223372036854775808 -123.45 -123456.789 -123456789 -1234.5678 -123456.789012 -123456789.012345678901 string_value binary_value 2024-03-22 2024-03-22T12:00 2024-03-22T12:00:00.123457 2024-03-22T12:00:00.123457 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"x":"y"} {3:20} {3:200000000000} {3.2:20.2} {3.2:20.2} {0:1} {3.2:2.2} {3.34:2.34} {2.3456:2.3456} {2.34567890:2.34567890} {2.34567890 [...] +true 127 32767 2147483647 9223372036854775807 123.45 123456.789 123456789 1234.5678 123456.789012 123456789.012345678901 string_value binary_value 2024-03-20 2024-03-20T12:00 2024-03-20T12:00:00.123457 2024-03-20T12:00:00.123457 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"a":"b"} {1:10} {1:100000000000} {1.1:10.1} {1.1:10.1} {1:0} {1.1:1.1} {1.23:1.23} {1.2345:1.2345} {1.23456789:1.23456789} {1.23456789:1.23456789 [...] +true 127 32767 2147483647 9223372036854775807 123.45 123456.789 123456789 1234.5678 123456.789012 123456789.012345678901 string_value binary_value 2024-03-20 2024-03-20T12:00 2024-03-20T12:00:00.123457 2024-03-20T12:00:00.123457 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"a":"b"} {1:10} {1:100000000000} {1.1:10.1} {1.1:10.1} {1:0} {1.1:1.1} {1.23:1.23} {1.2345:1.2345} {1.23456789:1.23456789} {1.23456789:1.23456789 [...] + -- !q01 -- false -128 -32768 -2147483648 -9223372036854775808 -123.45 -123456.789 -123456789 -1234.5678 -123456.789012 -123456789.012345678901 string_value binary_value 2024-03-21 2024-03-21T12:00 2024-03-21T12:00:00.123456 2024-03-21T12:00:00.123456 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"x":"y"} {2:20} {2:200000000000} {2.2:20.2} {2.2:20.2} {0:1} {2.2:2.2} {2.34:2.34} {2.3456:2.3456} {2.34567890:2.34567890} {2.34567890 [...] false -128 -32768 -2147483648 -9223372036854775808 -123.45 -123456.789 -123456789 -1234.5678 -123456.789012 -123456789.012345678901 string_value binary_value 2024-03-22 2024-03-22T12:00 2024-03-22T12:00:00.123456 2024-03-22T12:00:00.123456 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"x":"y"} {3:20} {3:200000000000} {3.2:20.2} {3.2:20.2} {0:1} {3.2:2.2} {3.34:2.34} {2.3456:2.3456} {2.34567890:2.34567890} {2.34567890 [...] @@ -165,3 +215,19 @@ false -128 -32768 -2147483648 -9223372036854775808 -123.45 -123456.789 -12345678 true 127 32767 2147483647 9223372036854775807 123.45 123456.789 123456789 1234.5678 123456.789012 123456789.012345678901 string_value binary_value 2024-03-20 2024-03-20T12:00 2024-03-20T12:00:00.123456 2024-03-20T12:00:00.123456 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"a":"b"} {1:10} {1:100000000000} {1.1:10.1} {1.1:10.1} {1:0} {1.1:1.1} {1.23:1.23} {1.2345:1.2345} {1.23456789:1.23456789} {1.23456789:1.23456789 [...] true 127 32767 2147483647 9223372036854775807 123.45 123456.789 123456789 1234.5678 123456.789012 123456789.012345678901 string_value binary_value 2024-03-20 2024-03-20T12:00 2024-03-20T12:00:00.123456 2024-03-20T12:00:00.123456 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"a":"b"} {1:10} {1:100000000000} {1.1:10.1} {1.1:10.1} {1:0} {1.1:1.1} {1.23:1.23} {1.2345:1.2345} {1.23456789:1.23456789} {1.23456789:1.23456789 [...] +-- !q03 -- +\N \N \N \N \N -123.45 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N {2:20} \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N [3.4567, 4.5678] \N \N \N \N \N \N \N \N \N \N [null, "value1", "value2"] \N \N \N 20240321 +\N \N \N \N \N -123.45 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N {3:20} \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N [8.4567, 4.5678] \N \N \N \N \N \N \N \N \N \N [null, "value1", "value2"] \N \N \N 20240322 +\N \N \N \N \N 123.45 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N {1:10} \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N [1.2345, 2.3456] \N \N \N \N \N \N \N \N \N \N [null, "value1", "value2"] \N \N \N 20240320 +false -128 -32768 -2147483648 -9223372036854775808 -123.45 -123456.789 -123456789 -1234.5678 -123456.789012 -123456789.012345678901 string_value binary_value 2024-03-21 2024-03-21T12:00 2024-03-21T12:00:00.123456 2024-03-21T12:00:00.123456 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"x":"y"} {2:20} {2:200000000000} {2.2:20.2} {2.2:20.2} {0:1} {2.2:2.2} {2.34:2.34} {2.3456:2.3456} {2.34567890:2.34567890} {2.34567890 [...] +false -128 -32768 -2147483648 -9223372036854775808 -123.45 -123456.789 -123456789 -1234.5678 -123456.789012 -123456789.012345678901 string_value binary_value 2024-03-21 2024-03-21T12:00 2024-03-21T12:00:00.123456 2024-03-21T12:00:00.123456 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"x":"y"} {2:20} {2:200000000000} {2.2:20.2} {2.2:20.2} {0:1} {2.2:2.2} {2.34:2.34} {2.3456:2.3456} {2.34567890:2.34567890} {2.34567890 [...] +false -128 -32768 -2147483648 -9223372036854775808 -123.45 -123456.789 -123456789 -1234.5678 -123456.789012 -123456789.012345678901 string_value binary_value 2024-03-22 2024-03-22T12:00 2024-03-22T12:00:00.123456 2024-03-22T12:00:00.123456 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"x":"y"} {3:20} {3:200000000000} {3.2:20.2} {3.2:20.2} {0:1} {3.2:2.2} {3.34:2.34} {2.3456:2.3456} {2.34567890:2.34567890} {2.34567890 [...] +false -128 -32768 -2147483648 -9223372036854775808 -123.45 -123456.789 -123456789 -1234.5678 -123456.789012 -123456789.012345678901 string_value binary_value 2024-03-22 2024-03-22T12:00 2024-03-22T12:00:00.123456 2024-03-22T12:00:00.123456 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"x":"y"} {3:20} {3:200000000000} {3.2:20.2} {3.2:20.2} {0:1} {3.2:2.2} {3.34:2.34} {2.3456:2.3456} {2.34567890:2.34567890} {2.34567890 [...] +true 127 32767 2147483647 9223372036854775807 123.45 123456.789 123456789 1234.5678 123456.789012 123456789.012345678901 string_value binary_value 2024-03-20 2024-03-20T12:00 2024-03-20T12:00:00.123456 2024-03-20T12:00:00.123456 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"a":"b"} {1:10} {1:100000000000} {1.1:10.1} {1.1:10.1} {1:0} {1.1:1.1} {1.23:1.23} {1.2345:1.2345} {1.23456789:1.23456789} {1.23456789:1.23456789 [...] +true 127 32767 2147483647 9223372036854775807 123.45 123456.789 123456789 1234.5678 123456.789012 123456789.012345678901 string_value binary_value 2024-03-20 2024-03-20T12:00 2024-03-20T12:00:00.123456 2024-03-20T12:00:00.123456 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"a":"b"} {1:10} {1:100000000000} {1.1:10.1} {1.1:10.1} {1:0} {1.1:1.1} {1.23:1.23} {1.2345:1.2345} {1.23456789:1.23456789} {1.23456789:1.23456789 [...] + +-- !q04 -- +\N \N \N \N \N -123.45 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N {2:20} \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N [3.4567, 4.5678] \N \N \N \N \N \N \N \N \N \N [null, "value1", "value2"] \N \N \N 20240321 +\N \N \N \N \N -123.45 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N {3:20} \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N [8.4567, 4.5678] \N \N \N \N \N \N \N \N \N \N [null, "value1", "value2"] \N \N \N 20240322 +\N \N \N \N \N 123.45 \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N {1:10} \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N \N [1.2345, 2.3456] \N \N \N \N \N \N \N \N \N \N [null, "value1", "value2"] \N \N \N 20240320 + diff --git a/regression-test/data/external_table_p0/hive/write/test_hive_write_partitions.out b/regression-test/data/external_table_p0/hive/write/test_hive_write_partitions.out index 2c0202874ce..463c6ef68a0 100644 --- a/regression-test/data/external_table_p0/hive/write/test_hive_write_partitions.out +++ b/regression-test/data/external_table_p0/hive/write/test_hive_write_partitions.out @@ -63,6 +63,31 @@ true 127 32767 2147483647 9223372036854775807 123.45 123456.789 123456789 1234.5 2 -123456.789012 string_value 62 69 6e 61 72 79 5f 76 61 6c 75 65 2024-03-21 2024-03-21T12:00 char_value1 varchar_value1 7 123456.789012 string_value 62 69 6e 61 72 79 5f 76 61 6c 75 65 2024-03-20 2024-03-20T12:00 char_value1 varchar_value1 +-- !q01 -- +1 \N -128 \N -2147483648 \N -123.45 \N + +-- !q02 -- +1 \N -128 \N -2147483648 \N -123.45 \N +2 \N -128 \N -2147483648 \N -123.45 \N + +-- !q03 -- +1 \N -128 \N -2147483648 \N -123.45 \N +2 \N -128 \N -2147483648 \N -123.45 \N +3 \N 127 \N 2147483647 \N 123.45 \N + +-- !q04 -- +1 \N -128 \N -2147483648 \N -123.45 \N +2 \N -128 \N -2147483648 \N -123.45 \N +3 \N 127 \N 2147483647 \N 123.45 \N +3 \N 127 \N 2147483647 \N 123.45 \N + +-- !q05 -- +1 \N -128 \N -2147483648 \N -123.45 \N +2 \N -128 \N -2147483648 \N -123.45 \N +3 \N 127 \N 2147483647 \N 123.45 \N +3 \N 127 \N 2147483647 \N 123.45 \N +7 true 127 32767 2147483647 9223372036854775807 123.45 123456.789 + -- !q01 -- false -128 -32768 -2147483648 -9223372036854775808 -123.45 -123456.789 -123456789 -1234.5678 -123456.789012 -123456789.012345678901 string_value binary_value 2024-03-21 2024-03-21T12:00 2024-03-21T12:00:00.123456 2024-03-21T12:00:00.123456 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"x":"y"} {2:20} {2:200000000000} {2.2:20.2} {2.2:20.2} {0:1} {2.2:2.2} {2.34:2.34} {2.3456:2.3456} {2.34567890:2.34567890} {2.34567890 [...] false -128 -32768 -2147483648 -9223372036854775808 -123.45 -123456.789 -123456789 -1234.5678 -123456.789012 -123456789.012345678901 string_value binary_value 2024-03-22 2024-03-22T12:00 2024-03-22T12:00:00.123456 2024-03-22T12:00:00.123456 char_value1 char_value2 char_value3 varchar_value1 varchar_value2 varchar_value3 {"key1":"value1"} {"key1":"value1"} {"x":"y"} {3:20} {3:200000000000} {3.2:20.2} {3.2:20.2} {0:1} {3.2:2.2} {3.34:2.34} {2.3456:2.3456} {2.34567890:2.34567890} {2.34567890 [...] @@ -127,3 +152,28 @@ true 127 32767 2147483647 9223372036854775807 123.45 123456.789 123456789 1234.5 2 -123456.789012 string_value 62 69 6e 61 72 79 5f 76 61 6c 75 65 2024-03-21 2024-03-21T12:00 char_value1 varchar_value1 7 123456.789012 string_value 62 69 6e 61 72 79 5f 76 61 6c 75 65 2024-03-20 2024-03-20T12:00 char_value1 varchar_value1 +-- !q01 -- +1 \N -128 \N -2147483648 \N -123.45 \N + +-- !q02 -- +1 \N -128 \N -2147483648 \N -123.45 \N +2 \N -128 \N -2147483648 \N -123.45 \N + +-- !q03 -- +1 \N -128 \N -2147483648 \N -123.45 \N +2 \N -128 \N -2147483648 \N -123.45 \N +3 \N 127 \N 2147483647 \N 123.45 \N + +-- !q04 -- +1 \N -128 \N -2147483648 \N -123.45 \N +2 \N -128 \N -2147483648 \N -123.45 \N +3 \N 127 \N 2147483647 \N 123.45 \N +3 \N 127 \N 2147483647 \N 123.45 \N + +-- !q05 -- +1 \N -128 \N -2147483648 \N -123.45 \N +2 \N -128 \N -2147483648 \N -123.45 \N +3 \N 127 \N 2147483647 \N 123.45 \N +3 \N 127 \N 2147483647 \N 123.45 \N +7 true 127 32767 2147483647 9223372036854775807 123.45 123456.789 + diff --git a/regression-test/pipeline/external/conf/regression-conf.groovy b/regression-test/pipeline/external/conf/regression-conf.groovy index aa85ad46138..8b7012b292c 100644 --- a/regression-test/pipeline/external/conf/regression-conf.groovy +++ b/regression-test/pipeline/external/conf/regression-conf.groovy @@ -61,6 +61,7 @@ excludeSuites = "000_the_start_sentinel_do_not_touch," + // keep this line as th "test_cast_string_to_array," + "test_refresh_mtmv," + "test_spark_load," + + "test_broker_load_func," + "zzz_the_end_sentinel_do_not_touch" // keep this line as the last line // this directories will not be executed diff --git a/regression-test/pipeline/p0/conf/regression-conf.groovy b/regression-test/pipeline/p0/conf/regression-conf.groovy index e9e12f44eb9..c3b9eb9fcc5 100644 --- a/regression-test/pipeline/p0/conf/regression-conf.groovy +++ b/regression-test/pipeline/p0/conf/regression-conf.groovy @@ -69,6 +69,7 @@ excludeSuites = "000_the_start_sentinel_do_not_touch," + // keep this line as th "test_profile," + "test_refresh_mtmv," + "test_spark_load," + + "test_broker_load_func," + "test_stream_stub_fault_injection," + "zzz_the_end_sentinel_do_not_touch" // keep this line as the last line diff --git a/regression-test/suites/external_table_p0/hive/write/test_hive_write_insert.groovy b/regression-test/suites/external_table_p0/hive/write/test_hive_write_insert.groovy index e5f57d7f78d..401b1cea413 100644 --- a/regression-test/suites/external_table_p0/hive/write/test_hive_write_insert.groovy +++ b/regression-test/suites/external_table_p0/hive/write/test_hive_write_insert.groovy @@ -26,67 +26,67 @@ suite("test_hive_write_insert", "p0,external,hive,external_docker,external_docke sql """ INSERT INTO all_types_${format_compression} VALUES ( - CAST(1 AS BOOLEAN), -- boolean_col - CAST(127 AS TINYINT), -- tinyint_col - CAST(32767 AS SMALLINT), -- smallint_col - CAST(2147483647 AS INT), -- int_col - CAST(9223372036854775807 AS BIGINT), -- bigint_col - CAST(123.45 AS FLOAT), -- float_col - CAST(123456.789 AS DOUBLE), -- double_col + 1, -- boolean_col + 127, -- tinyint_col + 32767, -- smallint_col + 2147483647, -- int_col + 9223372036854775807, -- bigint_col + 123.45, -- float_col + 123456.789, -- double_col CAST(123456789 AS DECIMAL(9,0)), -- decimal_col1 CAST(1234.5678 AS DECIMAL(8,4)), -- decimal_col2 CAST(123456.789012 AS DECIMAL(18,6)), -- decimal_col3 CAST(123456789.012345678901 AS DECIMAL(38,12)), -- decimal_col4 - CAST('string_value' AS STRING), -- string_col + 'string_value', -- string_col 'binary_value', -- binary_col '2024-03-20', -- date_col '2024-03-20 12:00:00', -- timestamp_col1 '2024-03-20 12:00:00.123456789', -- timestamp_col2 '2024-03-20 12:00:00.123456789', -- timestamp_col3 - CAST('char_value1' AS CHAR(50)), -- char_col1 - CAST('char_value2' AS CHAR(100)), -- char_col2 - CAST('char_value3' AS CHAR(255)), -- char_col3 - CAST('varchar_value1' AS VARCHAR(50)), -- varchar_col1 - CAST('varchar_value2' AS VARCHAR(100)), -- varchar_col2 - CAST('varchar_value3' AS VARCHAR(255)), -- varchar_col3 - MAP(CAST('key1' AS STRING), CAST('value1' AS STRING)), -- t_map_string - MAP(CAST('key1' AS VARCHAR(65535)), CAST('value1' AS VARCHAR(65535))), -- t_map_varchar - MAP(CAST('a' AS CHAR(10)), CAST('b' AS CHAR(10))), -- t_map_char - MAP(CAST(1 AS INT), CAST(10 AS INT)), -- t_map_int - MAP(CAST(1 AS BIGINT), CAST(100000000000 AS BIGINT)), -- t_map_bigint + 'char_value1', -- char_col1 + 'char_value2', -- char_col2 + 'char_value3', -- char_col3 + 'varchar_value1', -- varchar_col1 + 'varchar_value2', -- varchar_col2 + 'varchar_value3', -- varchar_col3 + MAP('key1', 'value1'), -- t_map_string + MAP('key1', 'value1'), -- t_map_varchar + MAP('a', 'b'), -- t_map_char + MAP(1, 10), -- t_map_int + MAP(1, 100000000000), -- t_map_bigint MAP(CAST(1.1 AS FLOAT), CAST(10.1 AS FLOAT)), -- t_map_float MAP(CAST(1.1 AS DOUBLE), CAST(10.1 AS DOUBLE)), -- t_map_double - MAP(CAST(true AS BOOLEAN), CAST(false AS BOOLEAN)), -- t_map_boolean + MAP(TRUE, FALSE), -- t_map_boolean MAP(CAST(1.1 AS DECIMAL(2,1)), CAST(1.1 AS DECIMAL(2,1))), -- t_map_decimal_precision_2 MAP(CAST(1.23 AS DECIMAL(4,2)), CAST(1.23 AS DECIMAL(4,2))), -- t_map_decimal_precision_4 MAP(CAST(1.2345 AS DECIMAL(8,4)), CAST(1.2345 AS DECIMAL(8,4))), -- t_map_decimal_precision_8 MAP(CAST(1.23456789 AS DECIMAL(17,8)), CAST(1.23456789 AS DECIMAL(17,8))), -- t_map_decimal_precision_17 MAP(CAST(1.23456789 AS DECIMAL(18,8)), CAST(1.23456789 AS DECIMAL(18,8))), -- t_map_decimal_precision_18 MAP(CAST(1.234567890123456789 AS DECIMAL(38,16)), CAST(1.234567890123456789 AS DECIMAL(38,16))), -- t_map_decimal_precision_38 - ARRAY(CAST('string1' AS STRING), CAST('string2' AS STRING)), -- t_array_string - ARRAY(CAST(1 AS INT), CAST(2 AS INT), CAST(3 AS INT)), -- t_array_int - ARRAY(CAST(100000000000 AS BIGINT), CAST(200000000000 AS BIGINT)), -- t_array_bigint + ARRAY('string1', 'string2'), -- t_array_string + ARRAY(1, 2, 3), -- t_array_int + ARRAY(100000000000, 200000000000), -- t_array_bigint ARRAY(CAST(1.1 AS FLOAT), CAST(2.2 AS FLOAT)), -- t_array_float ARRAY(CAST(1.123456789 AS DOUBLE), CAST(2.123456789 AS DOUBLE)), -- t_array_double - ARRAY(CAST(true AS BOOLEAN), CAST(false AS BOOLEAN)), -- t_array_boolean - ARRAY(CAST('varchar1' AS VARCHAR(65535)), CAST('varchar2' AS VARCHAR(65535))), -- t_array_varchar - ARRAY(CAST('char1' AS CHAR(10)), CAST('char2' AS CHAR(10))), -- t_array_char + ARRAY(TRUE, FALSE), -- t_array_boolean + ARRAY('varchar1', 'varchar2'), -- t_array_varchar + ARRAY('char1', 'char2'), -- t_array_char ARRAY(CAST(1.1 AS DECIMAL(2,1)), CAST(2.2 AS DECIMAL(2,1))), -- t_array_decimal_precision_2 ARRAY(CAST(1.23 AS DECIMAL(4,2)), CAST(2.34 AS DECIMAL(4,2))), -- t_array_decimal_precision_4 ARRAY(CAST(1.2345 AS DECIMAL(8,4)), CAST(2.3456 AS DECIMAL(8,4))), -- t_array_decimal_precision_8 ARRAY(CAST(1.23456789 AS DECIMAL(17,8)), CAST(2.34567891 AS DECIMAL(17,8))), -- t_array_decimal_precision_17 - ARRAY(CAST(1.23456789 AS DECIMAL(18,8)), CAST(2.34567891 AS DECIMAL(18,8))), -- t_array_decimal_precision_18 - ARRAY(CAST(1.234567890123456789 AS DECIMAL(38,16)), CAST(2.345678901234567890 AS DECIMAL(38,16))), -- t_array_decimal_precision_38 - NAMED_STRUCT('s_bigint', CAST(1234567890 AS BIGINT)), -- t_struct_bigint - MAP(CAST('key' AS STRING), ARRAY(NAMED_STRUCT('s_int', CAST(123 AS INT)))), -- t_complex - NAMED_STRUCT('struct_field', ARRAY(CAST('value1' AS STRING), CAST('value2' AS STRING))), -- t_struct_nested - NAMED_STRUCT('struct_field_null', CAST(null AS STRING), 'struct_field_null2', CAST(null AS STRING)), -- t_struct_null - NAMED_STRUCT('struct_non_nulls_after_nulls1', CAST(123 AS INT), 'struct_non_nulls_after_nulls2', CAST('value' AS STRING)), -- t_struct_non_nulls_after_nulls - NAMED_STRUCT('struct_field1', CAST(123 AS INT), 'struct_field2', CAST('value' AS STRING), 'strict_field3', NAMED_STRUCT('nested_struct_field1', CAST(123 AS INT), 'nested_struct_field2', CAST('nested_value' AS STRING))), -- t_nested_struct_non_nulls_after_nulls + ARRAY(1.23456789, 2.34567891), -- t_array_decimal_precision_18 + ARRAY(1.234567890123456789, 2.345678901234567890), -- t_array_decimal_precision_38 + NAMED_STRUCT('s_bigint', 1234567890), -- t_struct_bigint + MAP('key', ARRAY(NAMED_STRUCT('s_int', 123))), -- t_complex + NAMED_STRUCT('struct_field', ARRAY('value1', 'value2')), -- t_struct_nested + NAMED_STRUCT('struct_field_null', null, 'struct_field_null2', null), -- t_struct_null + NAMED_STRUCT('struct_non_nulls_after_nulls1', 123, 'struct_non_nulls_after_nulls2', 'value'), -- t_struct_non_nulls_after_nulls + NAMED_STRUCT('struct_field1', 123, 'struct_field2', 'value', 'strict_field3', NAMED_STRUCT('nested_struct_field1', 123, 'nested_struct_field2', 'nested_value')), -- t_nested_struct_non_nulls_after_nulls MAP('null_key', null), -- t_map_null_value - ARRAY(null, CAST('value1' AS STRING), CAST('value2' AS STRING)), -- t_array_string_starting_with_nulls - ARRAY(CAST('value1' AS STRING), null, CAST('value2' AS STRING)), -- t_array_string_with_nulls_in_between - ARRAY(CAST('value1' AS STRING), CAST('value2' AS STRING), null), -- t_array_string_ending_with_nulls + ARRAY(null, 'value1', 'value2'), -- t_array_string_starting_with_nulls + ARRAY('value1', null, 'value2'), -- t_array_string_with_nulls_in_between + ARRAY('value1', 'value2', null), -- t_array_string_ending_with_nulls ARRAY(null, null, null), -- t_array_string_all_nulls 20240320 -- dt ); @@ -97,197 +97,197 @@ suite("test_hive_write_insert", "p0,external,hive,external_docker,external_docke sql """ INSERT INTO all_types_${format_compression} VALUES ( - CAST(1 AS BOOLEAN), -- boolean_col - CAST(127 AS TINYINT), -- tinyint_col - CAST(32767 AS SMALLINT), -- smallint_col - CAST(2147483647 AS INT), -- int_col - CAST(9223372036854775807 AS BIGINT), -- bigint_col + 1, -- boolean_col + 127, -- tinyint_col + 32767, -- smallint_col + 2147483647, -- int_col + 9223372036854775807, -- bigint_col CAST(123.45 AS FLOAT), -- float_col CAST(123456.789 AS DOUBLE), -- double_col CAST(123456789 AS DECIMAL(9,0)), -- decimal_col1 CAST(1234.5678 AS DECIMAL(8,4)), -- decimal_col2 CAST(123456.789012 AS DECIMAL(18,6)), -- decimal_col3 CAST(123456789.012345678901 AS DECIMAL(38,12)), -- decimal_col4 - CAST('string_value' AS STRING), -- string_col + 'string_value', -- string_col 'binary_value', -- binary_col '2024-03-20', -- date_col '2024-03-20 12:00:00', -- timestamp_col1 '2024-03-20 12:00:00.123456789', -- timestamp_col2 '2024-03-20 12:00:00.123456789', -- timestamp_col3 - CAST('char_value1' AS CHAR(50)), -- char_col1 - CAST('char_value2' AS CHAR(100)), -- char_col2 - CAST('char_value3' AS CHAR(255)), -- char_col3 - CAST('varchar_value1' AS VARCHAR(50)), -- varchar_col1 - CAST('varchar_value2' AS VARCHAR(100)), -- varchar_col2 - CAST('varchar_value3' AS VARCHAR(255)), -- varchar_col3 - MAP(CAST('key1' AS STRING), CAST('value1' AS STRING)), -- t_map_string - MAP(CAST('key1' AS VARCHAR(65535)), CAST('value1' AS VARCHAR(65535))), -- t_map_varchar - MAP(CAST('a' AS CHAR(10)), CAST('b' AS CHAR(10))), -- t_map_char - MAP(CAST(1 AS INT), CAST(10 AS INT)), -- t_map_int - MAP(CAST(1 AS BIGINT), CAST(100000000000 AS BIGINT)), -- t_map_bigint + 'char_value1', -- char_col1 + 'char_value2', -- char_col2 + 'char_value3', -- char_col3 + 'varchar_value1', -- varchar_col1 + 'varchar_value2', -- varchar_col2 + 'varchar_value3', -- varchar_col3 + MAP('key1', 'value1'), -- t_map_string + MAP('key1', 'value1'), -- t_map_varchar + MAP('a', 'b'), -- t_map_char + MAP(1, 10), -- t_map_int + MAP(1, 100000000000), -- t_map_bigint MAP(CAST(1.1 AS FLOAT), CAST(10.1 AS FLOAT)), -- t_map_float MAP(CAST(1.1 AS DOUBLE), CAST(10.1 AS DOUBLE)), -- t_map_double - MAP(CAST(true AS BOOLEAN), CAST(false AS BOOLEAN)), -- t_map_boolean + MAP(true, false), -- t_map_boolean MAP(CAST(1.1 AS DECIMAL(2,1)), CAST(1.1 AS DECIMAL(2,1))), -- t_map_decimal_precision_2 MAP(CAST(1.23 AS DECIMAL(4,2)), CAST(1.23 AS DECIMAL(4,2))), -- t_map_decimal_precision_4 MAP(CAST(1.2345 AS DECIMAL(8,4)), CAST(1.2345 AS DECIMAL(8,4))), -- t_map_decimal_precision_8 MAP(CAST(1.23456789 AS DECIMAL(17,8)), CAST(1.23456789 AS DECIMAL(17,8))), -- t_map_decimal_precision_17 MAP(CAST(1.23456789 AS DECIMAL(18,8)), CAST(1.23456789 AS DECIMAL(18,8))), -- t_map_decimal_precision_18 MAP(CAST(1.234567890123456789 AS DECIMAL(38,16)), CAST(1.234567890123456789 AS DECIMAL(38,16))), -- t_map_decimal_precision_38 - ARRAY(CAST('string1' AS STRING), CAST('string2' AS STRING)), -- t_array_string - ARRAY(CAST(1 AS INT), CAST(2 AS INT), CAST(3 AS INT)), -- t_array_int - ARRAY(CAST(100000000000 AS BIGINT), CAST(200000000000 AS BIGINT)), -- t_array_bigint + ARRAY('string1', 'string2'), -- t_array_string + ARRAY(1, 2, 3), -- t_array_int + ARRAY(100000000000, 200000000000), -- t_array_bigint ARRAY(CAST(1.1 AS FLOAT), CAST(2.2 AS FLOAT)), -- t_array_float ARRAY(CAST(1.123456789 AS DOUBLE), CAST(2.123456789 AS DOUBLE)), -- t_array_double - ARRAY(CAST(true AS BOOLEAN), CAST(false AS BOOLEAN)), -- t_array_boolean - ARRAY(CAST('varchar1' AS VARCHAR(65535)), CAST('varchar2' AS VARCHAR(65535))), -- t_array_varchar - ARRAY(CAST('char1' AS CHAR(10)), CAST('char2' AS CHAR(10))), -- t_array_char + ARRAY(true, false), -- t_array_boolean + ARRAY('varchar1', 'varchar2'), -- t_array_varchar + ARRAY('char1', 'char2'), -- t_array_char ARRAY(CAST(1.1 AS DECIMAL(2,1)), CAST(2.2 AS DECIMAL(2,1))), -- t_array_decimal_precision_2 ARRAY(CAST(1.23 AS DECIMAL(4,2)), CAST(2.34 AS DECIMAL(4,2))), -- t_array_decimal_precision_4 ARRAY(CAST(1.2345 AS DECIMAL(8,4)), CAST(2.3456 AS DECIMAL(8,4))), -- t_array_decimal_precision_8 ARRAY(CAST(1.23456789 AS DECIMAL(17,8)), CAST(2.34567891 AS DECIMAL(17,8))), -- t_array_decimal_precision_17 ARRAY(CAST(1.23456789 AS DECIMAL(18,8)), CAST(2.34567891 AS DECIMAL(18,8))), -- t_array_decimal_precision_18 ARRAY(CAST(1.234567890123456789 AS DECIMAL(38,16)), CAST(2.345678901234567890 AS DECIMAL(38,16))), -- t_array_decimal_precision_38 - NAMED_STRUCT('s_bigint', CAST(1234567890 AS BIGINT)), -- t_struct_bigint - MAP(CAST('key' AS STRING), ARRAY(NAMED_STRUCT('s_int', CAST(123 AS INT)))), -- t_complex - NAMED_STRUCT('struct_field', ARRAY(CAST('value1' AS STRING), CAST('value2' AS STRING))), -- t_struct_nested - NAMED_STRUCT('struct_field_null', CAST(null AS STRING), 'struct_field_null2', CAST(null AS STRING)), -- t_struct_null - NAMED_STRUCT('struct_non_nulls_after_nulls1', CAST(123 AS INT), 'struct_non_nulls_after_nulls2', CAST('value' AS STRING)), -- t_struct_non_nulls_after_nulls - NAMED_STRUCT('struct_field1', CAST(123 AS INT), 'struct_field2', CAST('value' AS STRING), 'strict_field3', NAMED_STRUCT('nested_struct_field1', CAST(123 AS INT), 'nested_struct_field2', CAST('nested_value' AS STRING))), -- t_nested_struct_non_nulls_after_nulls + NAMED_STRUCT('s_bigint', 1234567890), -- t_struct_bigint + MAP('key', ARRAY(NAMED_STRUCT('s_int', 123))), -- t_complex + NAMED_STRUCT('struct_field', ARRAY('value1', 'value2')), -- t_struct_nested + NAMED_STRUCT('struct_field_null', null, 'struct_field_null2', null), -- t_struct_null + NAMED_STRUCT('struct_non_nulls_after_nulls1', 123, 'struct_non_nulls_after_nulls2', 'value'), -- t_struct_non_nulls_after_nulls + NAMED_STRUCT('struct_field1', 123, 'struct_field2', 'value', 'strict_field3', NAMED_STRUCT('nested_struct_field1', 123, 'nested_struct_field2', 'nested_value')), -- t_nested_struct_non_nulls_after_nulls MAP('null_key', null), -- t_map_null_value - ARRAY(null, CAST('value1' AS STRING), CAST('value2' AS STRING)), -- t_array_string_starting_with_nulls - ARRAY(CAST('value1' AS STRING), null, CAST('value2' AS STRING)), -- t_array_string_with_nulls_in_between - ARRAY(CAST('value1' AS STRING), CAST('value2' AS STRING), null), -- t_array_string_ending_with_nulls + ARRAY(null, 'value1', 'value2'), -- t_array_string_starting_with_nulls + ARRAY('value1', null, 'value2'), -- t_array_string_with_nulls_in_between + ARRAY('value1', 'value2', null), -- t_array_string_ending_with_nulls ARRAY(null, null, null), -- t_array_string_all_nulls 20240320 -- dt ), ( - CAST(0 AS BOOLEAN), -- boolean_col - CAST(-128 AS TINYINT), -- tinyint_col - CAST(-32768 AS SMALLINT), -- smallint_col - CAST(-2147483648 AS INT), -- int_col - CAST(-9223372036854775808 AS BIGINT), -- bigint_col + 0, -- boolean_col + -128, -- tinyint_col + -32768, -- smallint_col + -2147483648, -- int_col + -9223372036854775808, -- bigint_col CAST(-123.45 AS FLOAT), -- float_col CAST(-123456.789 AS DOUBLE), -- double_col CAST(-123456789 AS DECIMAL(9,0)), -- decimal_col1 CAST(-1234.5678 AS DECIMAL(8,4)), -- decimal_col2 CAST(-123456.789012 AS DECIMAL(18,6)), -- decimal_col3 CAST(-123456789.012345678901 AS DECIMAL(38,12)), -- decimal_col4 - CAST('string_value' AS STRING), -- string_col + 'string_value', -- string_col 'binary_value', -- binary_col '2024-03-21', -- date_col '2024-03-21 12:00:00', -- timestamp_col1 '2024-03-21 12:00:00.123456789', -- timestamp_col2 '2024-03-21 12:00:00.123456789', -- timestamp_col3 - CAST('char_value1' AS CHAR(50)), -- char_col1 - CAST('char_value2' AS CHAR(100)), -- char_col2 - CAST('char_value3' AS CHAR(255)), -- char_col3 - CAST('varchar_value1' AS VARCHAR(50)), -- varchar_col1 - CAST('varchar_value2' AS VARCHAR(100)), -- varchar_col2 - CAST('varchar_value3' AS VARCHAR(255)), -- varchar_col3 - MAP(CAST('key1' AS STRING), CAST('value1' AS STRING)), -- t_map_string - MAP(CAST('key1' AS VARCHAR(65535)), CAST('value1' AS VARCHAR(65535))), -- t_map_varchar - MAP(CAST('x' AS CHAR(10)), CAST('y' AS CHAR(10))), -- t_map_char - MAP(CAST(2 AS INT), CAST(20 AS INT)), -- t_map_int - MAP(CAST(2 AS BIGINT), CAST(200000000000 AS BIGINT)), -- t_map_bigint + 'char_value1', -- char_col1 + 'char_value2', -- char_col2 + 'char_value3', -- char_col3 + 'varchar_value1', -- varchar_col1 + 'varchar_value2', -- varchar_col2 + 'varchar_value3', -- varchar_col3 + MAP('key1', 'value1'), -- t_map_string + MAP('key1', 'value1'), -- t_map_varchar + MAP('x', 'y'), -- t_map_char + MAP(2, 20), -- t_map_int + MAP(2, 200000000000), -- t_map_bigint MAP(CAST(2.2 AS FLOAT), CAST(20.2 AS FLOAT)), -- t_map_float MAP(CAST(2.2 AS DOUBLE), CAST(20.2 AS DOUBLE)), -- t_map_double - MAP(CAST(false AS BOOLEAN), CAST(true AS BOOLEAN)), -- t_map_boolean + MAP(false, true), -- t_map_boolean MAP(CAST(2.2 AS DECIMAL(2,1)), CAST(2.2 AS DECIMAL(2,1))), -- t_map_decimal_precision_2 MAP(CAST(2.34 AS DECIMAL(4,2)), CAST(2.34 AS DECIMAL(4,2))), -- t_map_decimal_precision_4 MAP(CAST(2.3456 AS DECIMAL(8,4)), CAST(2.3456 AS DECIMAL(8,4))), -- t_map_decimal_precision_8 MAP(CAST(2.34567890 AS DECIMAL(17,8)), CAST(2.34567890 AS DECIMAL(17,8))), -- t_map_decimal_precision_17 MAP(CAST(2.34567890 AS DECIMAL(18,8)), CAST(2.34567890 AS DECIMAL(18,8))), -- t_map_decimal_precision_18 MAP(CAST(2.345678901234567890 AS DECIMAL(38,16)), CAST(2.345678901234567890 AS DECIMAL(38,16))), -- t_map_decimal_precision_38 - ARRAY(CAST('string1' AS STRING), CAST('string2' AS STRING)), -- t_array_string - ARRAY(CAST(4 AS INT), CAST(5 AS INT), CAST(6 AS INT)), -- t_array_int - ARRAY(CAST(300000000000 AS BIGINT), CAST(400000000000 AS BIGINT)), -- t_array_bigint + ARRAY('string1', 'string2'), -- t_array_string + ARRAY(4, 5, 6), -- t_array_int + ARRAY(300000000000, 400000000000), -- t_array_bigint ARRAY(CAST(3.3 AS FLOAT), CAST(4.4 AS FLOAT)), -- t_array_float ARRAY(CAST(3.123456789 AS DOUBLE), CAST(4.123456789 AS DOUBLE)), -- t_array_double - ARRAY(CAST(false AS BOOLEAN), CAST(true AS BOOLEAN)), -- t_array_boolean - ARRAY(CAST('varchar1' AS VARCHAR(65535)), CAST('varchar2' AS VARCHAR(65535))), -- t_array_varchar - ARRAY(CAST('char1' AS CHAR(10)), CAST('char2' AS CHAR(10))), -- t_array_char + ARRAY(false, true), -- t_array_boolean + ARRAY('varchar1', 'varchar2'), -- t_array_varchar + ARRAY('char1', 'char2'), -- t_array_char ARRAY(CAST(3.3 AS DECIMAL(2,1)), CAST(4.4 AS DECIMAL(2,1))), -- t_array_decimal_precision_2 ARRAY(CAST(3.45 AS DECIMAL(4,2)), CAST(4.56 AS DECIMAL(4,2))), -- t_array_decimal_precision_4 ARRAY(CAST(3.4567 AS DECIMAL(8,4)), CAST(4.5678 AS DECIMAL(8,4))), -- t_array_decimal_precision_8 ARRAY(CAST(3.45678901 AS DECIMAL(17,8)), CAST(4.56789012 AS DECIMAL(17,8))), -- t_array_decimal_precision_17 ARRAY(CAST(3.45678901 AS DECIMAL(18,8)), CAST(4.56789012 AS DECIMAL(18,8))), -- t_array_decimal_precision_18 ARRAY(CAST(3.456789012345678901 AS DECIMAL(38,16)), CAST(4.567890123456789012 AS DECIMAL(38,16))), -- t_array_decimal_precision_38 - NAMED_STRUCT('s_bigint', CAST(-1234567890 AS BIGINT)), -- t_struct_bigint - MAP(CAST('key' AS STRING), ARRAY(NAMED_STRUCT('s_int', CAST(-123 AS INT)))), -- t_complex - NAMED_STRUCT('struct_field', ARRAY(CAST('value1' AS STRING), CAST('value2' AS STRING))), -- t_struct_nested - NAMED_STRUCT('struct_field_null', CAST(null AS STRING), 'struct_field_null2', CAST(null AS STRING)), -- t_struct_null - NAMED_STRUCT('struct_non_nulls_after_nulls1', CAST(-123 AS INT), 'struct_non_nulls_after_nulls2', CAST('value' AS STRING)), -- t_struct_non_nulls_after_nulls - NAMED_STRUCT('struct_field1', CAST(-123 AS INT), 'struct_field2', CAST('value' AS STRING), 'strict_field3', NAMED_STRUCT('nested_struct_field1', CAST(-123 AS INT), 'nested_struct_field2', CAST('nested_value' AS STRING))), -- t_nested_struct_non_nulls_after_nulls + NAMED_STRUCT('s_bigint', -1234567890), -- t_struct_bigint + MAP('key', ARRAY(NAMED_STRUCT('s_int', -123))), -- t_complex + NAMED_STRUCT('struct_field', ARRAY('value1', 'value2')), -- t_struct_nested + NAMED_STRUCT('struct_field_null', null, 'struct_field_null2', null), -- t_struct_null + NAMED_STRUCT('struct_non_nulls_after_nulls1', -123, 'struct_non_nulls_after_nulls2', 'value'), -- t_struct_non_nulls_after_nulls + NAMED_STRUCT('struct_field1', -123, 'struct_field2', 'value', 'strict_field3', NAMED_STRUCT('nested_struct_field1', -123, 'nested_struct_field2', 'nested_value')), -- t_nested_struct_non_nulls_after_nulls MAP('null_key', null), -- t_map_null_value - ARRAY(null, CAST('value1' AS STRING), CAST('value2' AS STRING)), -- t_array_string_starting_with_nulls - ARRAY(CAST('value1' AS STRING), null, CAST('value2' AS STRING)), -- t_array_string_with_nulls_in_between - ARRAY(CAST('value1' AS STRING), CAST('value2' AS STRING), null), -- t_array_string_ending_with_nulls + ARRAY(null, 'value1', 'value2'), -- t_array_string_starting_with_nulls + ARRAY('value1', null, 'value2'), -- t_array_string_with_nulls_in_between + ARRAY('value1', 'value2', null), -- t_array_string_ending_with_nulls ARRAY(null, null, null), -- t_array_string_all_nulls 20240321 -- dt ), ( - CAST(0 AS BOOLEAN), -- boolean_col - CAST(-128 AS TINYINT), -- tinyint_col - CAST(-32768 AS SMALLINT), -- smallint_col - CAST(-2147483648 AS INT), -- int_col - CAST(-9223372036854775808 AS BIGINT), -- bigint_col + 0, -- boolean_col + -128, -- tinyint_col + -32768, -- smallint_col + -2147483648, -- int_col + -9223372036854775808, -- bigint_col CAST(-123.45 AS FLOAT), -- float_col CAST(-123456.789 AS DOUBLE), -- double_col CAST(-123456789 AS DECIMAL(9,0)), -- decimal_col1 CAST(-1234.5678 AS DECIMAL(8,4)), -- decimal_col2 CAST(-123456.789012 AS DECIMAL(18,6)), -- decimal_col3 CAST(-123456789.012345678901 AS DECIMAL(38,12)), -- decimal_col4 - CAST('string_value' AS STRING), -- string_col + 'string_value', -- string_col 'binary_value', -- binary_col '2024-03-22', -- date_col '2024-03-22 12:00:00', -- timestamp_col1 '2024-03-22 12:00:00.123456789', -- timestamp_col2 '2024-03-22 12:00:00.123456789', -- timestamp_col3 - CAST('char_value1' AS CHAR(50)), -- char_col1 - CAST('char_value2' AS CHAR(100)), -- char_col2 - CAST('char_value3' AS CHAR(255)), -- char_col3 - CAST('varchar_value1' AS VARCHAR(50)), -- varchar_col1 - CAST('varchar_value2' AS VARCHAR(100)), -- varchar_col2 - CAST('varchar_value3' AS VARCHAR(255)), -- varchar_col3 - MAP(CAST('key1' AS STRING), CAST('value1' AS STRING)), -- t_map_string - MAP(CAST('key1' AS VARCHAR(65535)), CAST('value1' AS VARCHAR(65535))), -- t_map_varchar - MAP(CAST('x' AS CHAR(10)), CAST('y' AS CHAR(10))), -- t_map_char - MAP(CAST(3 AS INT), CAST(20 AS INT)), -- t_map_int - MAP(CAST(3 AS BIGINT), CAST(200000000000 AS BIGINT)), -- t_map_bigint + 'char_value1', -- char_col1 + 'char_value2', -- char_col2 + 'char_value3', -- char_col3 + 'varchar_value1', -- varchar_col1 + 'varchar_value2', -- varchar_col2 + 'varchar_value3', -- varchar_col3 + MAP('key1', 'value1'), -- t_map_string + MAP('key1', 'value1'), -- t_map_varchar + MAP('x', 'y'), -- t_map_char + MAP(3, 20), -- t_map_int + MAP(3, 200000000000), -- t_map_bigint MAP(CAST(3.2 AS FLOAT), CAST(20.2 AS FLOAT)), -- t_map_float MAP(CAST(3.2 AS DOUBLE), CAST(20.2 AS DOUBLE)), -- t_map_double - MAP(CAST(false AS BOOLEAN), CAST(true AS BOOLEAN)), -- t_map_boolean + MAP(false, true), -- t_map_boolean MAP(CAST(3.2 AS DECIMAL(2,1)), CAST(2.2 AS DECIMAL(2,1))), -- t_map_decimal_precision_2 MAP(CAST(3.34 AS DECIMAL(4,2)), CAST(2.34 AS DECIMAL(4,2))), -- t_map_decimal_precision_4 MAP(CAST(2.3456 AS DECIMAL(8,4)), CAST(2.3456 AS DECIMAL(8,4))), -- t_map_decimal_precision_8 MAP(CAST(2.34567890 AS DECIMAL(17,8)), CAST(2.34567890 AS DECIMAL(17,8))), -- t_map_decimal_precision_17 MAP(CAST(2.34567890 AS DECIMAL(18,8)), CAST(2.34567890 AS DECIMAL(18,8))), -- t_map_decimal_precision_18 MAP(CAST(3.345678901234567890 AS DECIMAL(38,16)), CAST(2.345678901234567890 AS DECIMAL(38,16))), -- t_map_decimal_precision_38 - ARRAY(CAST('string1' AS STRING), CAST('string2' AS STRING)), -- t_array_string - ARRAY(CAST(4 AS INT), CAST(5 AS INT), CAST(6 AS INT)), -- t_array_int - ARRAY(CAST(300000000000 AS BIGINT), CAST(400000000000 AS BIGINT)), -- t_array_bigint + ARRAY('string1', 'string2'), -- t_array_string + ARRAY(4, 5, 6), -- t_array_int + ARRAY(300000000000, 400000000000), -- t_array_bigint ARRAY(CAST(3.3 AS FLOAT), CAST(4.4 AS FLOAT)), -- t_array_float ARRAY(CAST(3.123456789 AS DOUBLE), CAST(4.123456789 AS DOUBLE)), -- t_array_double - ARRAY(CAST(false AS BOOLEAN), CAST(true AS BOOLEAN)), -- t_array_boolean - ARRAY(CAST('varchar1' AS VARCHAR(65535)), CAST('varchar2' AS VARCHAR(65535))), -- t_array_varchar - ARRAY(CAST('char1' AS CHAR(10)), CAST('char2' AS CHAR(10))), -- t_array_char + ARRAY(false, true), -- t_array_boolean + ARRAY('varchar1', 'varchar2'), -- t_array_varchar + ARRAY('char1', 'char2'), -- t_array_char ARRAY(CAST(3.3 AS DECIMAL(2,1)), CAST(4.4 AS DECIMAL(2,1))), -- t_array_decimal_precision_2 ARRAY(CAST(3.45 AS DECIMAL(4,2)), CAST(4.56 AS DECIMAL(4,2))), -- t_array_decimal_precision_4 ARRAY(CAST(8.4567 AS DECIMAL(8,4)), CAST(4.5678 AS DECIMAL(8,4))), -- t_array_decimal_precision_8 ARRAY(CAST(3.45678901 AS DECIMAL(17,8)), CAST(4.56789012 AS DECIMAL(17,8))), -- t_array_decimal_precision_17 ARRAY(CAST(3.45678901 AS DECIMAL(18,8)), CAST(4.56789012 AS DECIMAL(18,8))), -- t_array_decimal_precision_18 ARRAY(CAST(3.456789012345678901 AS DECIMAL(38,16)), CAST(4.567890123456789012 AS DECIMAL(38,16))), -- t_array_decimal_precision_38 - NAMED_STRUCT('s_bigint', CAST(-1234567890 AS BIGINT)), -- t_struct_bigint - MAP(CAST('key' AS STRING), ARRAY(NAMED_STRUCT('s_int', CAST(-123 AS INT)))), -- t_complex - NAMED_STRUCT('struct_field', ARRAY(CAST('value1' AS STRING), CAST('value2' AS STRING))), -- t_struct_nested - NAMED_STRUCT('struct_field_null', CAST(null AS STRING), 'struct_field_null2', CAST(null AS STRING)), -- t_struct_null - NAMED_STRUCT('struct_non_nulls_after_nulls1', CAST(-123 AS INT), 'struct_non_nulls_after_nulls2', CAST('value' AS STRING)), -- t_struct_non_nulls_after_nulls - NAMED_STRUCT('struct_field1', CAST(-123 AS INT), 'struct_field2', CAST('value' AS STRING), 'strict_field3', NAMED_STRUCT('nested_struct_field1', CAST(-123 AS INT), 'nested_struct_field2', CAST('nested_value' AS STRING))), -- t_nested_struct_non_nulls_after_nulls + NAMED_STRUCT('s_bigint', -1234567890), -- t_struct_bigint + MAP('key', ARRAY(NAMED_STRUCT('s_int', -123))), -- t_complex + NAMED_STRUCT('struct_field', ARRAY('value1', 'value2')), -- t_struct_nested + NAMED_STRUCT('struct_field_null', null, 'struct_field_null2', null), -- t_struct_null + NAMED_STRUCT('struct_non_nulls_after_nulls1', -123, 'struct_non_nulls_after_nulls2', 'value'), -- t_struct_non_nulls_after_nulls + NAMED_STRUCT('struct_field1', -123, 'struct_field2', 'value', 'strict_field3', NAMED_STRUCT('nested_struct_field1', -123, 'nested_struct_field2', 'nested_value')), -- t_nested_struct_non_nulls_after_nulls MAP('null_key', null), -- t_map_null_value - ARRAY(null, CAST('value1' AS STRING), CAST('value2' AS STRING)), -- t_array_string_starting_with_nulls - ARRAY(CAST('value1' AS STRING), null, CAST('value2' AS STRING)), -- t_array_string_with_nulls_in_between - ARRAY(CAST('value11' AS STRING), CAST('value2' AS STRING), null), -- t_array_string_ending_with_nulls + ARRAY(null, 'value1', 'value2'), -- t_array_string_starting_with_nulls + ARRAY('value1', null, 'value2'), -- t_array_string_with_nulls_in_between + ARRAY('value11', 'value2', null), -- t_array_string_ending_with_nulls ARRAY(null, null, null), -- t_array_string_all_nulls 20240322 -- dt ); @@ -299,9 +299,9 @@ suite("test_hive_write_insert", "p0,external,hive,external_docker,external_docke INSERT INTO all_types_${format_compression}(float_col, t_map_int, t_array_decimal_precision_8, t_array_string_starting_with_nulls) VALUES ( CAST(123.45 AS FLOAT), -- float_col - MAP(CAST(1 AS INT), CAST(10 AS INT)), -- t_map_int + MAP(1, 10), -- t_map_int ARRAY(CAST(1.2345 AS DECIMAL(8,4)), CAST(2.3456 AS DECIMAL(8,4))), -- t_array_decimal_precision_8 - ARRAY(null, CAST('value1' AS STRING), CAST('value2' AS STRING)) -- t_array_string_starting_with_nulls + ARRAY(null, 'value1', 'value2') -- t_array_string_starting_with_nulls ); """ order_qt_q03 """ select * from all_types_${format_compression}; @@ -310,67 +310,67 @@ suite("test_hive_write_insert", "p0,external,hive,external_docker,external_docke sql """ insert overwrite table all_types_${format_compression} VALUES ( - CAST(0 AS BOOLEAN), -- boolean_col - CAST(-7 AS TINYINT), -- tinyint_col - CAST(-15 AS SMALLINT), -- smallint_col - CAST(16 AS INT), -- int_col - CAST(-9223372036854775808 AS BIGINT), -- bigint_col + 0, -- boolean_col + -7, -- tinyint_col + -15, -- smallint_col + 16, -- int_col + -9223372036854775808, -- bigint_col CAST(-123.45 AS FLOAT), -- float_col CAST(-123456.789 AS DOUBLE), -- double_col CAST(123456789 AS DECIMAL(9,0)), -- decimal_col1 CAST(-1234.5678 AS DECIMAL(8,4)), -- decimal_col2 CAST(-123456.789012 AS DECIMAL(18,6)), -- decimal_col3 CAST(-123456789.012345678901 AS DECIMAL(38,12)), -- decimal_col4 - CAST('str' AS STRING), -- string_col + 'str', -- string_col 'binary_value', -- binary_col '2024-03-25', -- date_col '2024-03-25 12:00:00', -- timestamp_col1 '2024-03-25 12:00:00.123456789', -- timestamp_col2 '2024-03-25 12:00:00.123456789', -- timestamp_col3 - CAST('char_value11111' AS CHAR(50)), -- char_col1 - CAST('char_value22222' AS CHAR(100)), -- char_col2 - CAST('char_value33333' AS CHAR(255)), -- char_col3 - CAST('varchar_value11111' AS VARCHAR(50)), -- varchar_col1 - CAST('varchar_value22222' AS VARCHAR(100)), -- varchar_col2 - CAST('varchar_value33333' AS VARCHAR(255)), -- varchar_col3 - MAP(CAST('key7' AS STRING), CAST('value1' AS STRING)), -- t_map_string - MAP(CAST('key7' AS VARCHAR(65535)), CAST('value1' AS VARCHAR(65535))), -- t_map_varchar - MAP(CAST('x' AS CHAR(10)), CAST('y' AS CHAR(10))), -- t_map_char - MAP(CAST(3 AS INT), CAST(20 AS INT)), -- t_map_int - MAP(CAST(3 AS BIGINT), CAST(200000000000 AS BIGINT)), -- t_map_bigint + 'char_value11111', -- char_col1 + 'char_value22222', -- char_col2 + 'char_value33333', -- char_col3 + 'varchar_value11111', -- varchar_col1 + 'varchar_value22222', -- varchar_col2 + 'varchar_value33333', -- varchar_col3 + MAP('key7', 'value1'), -- t_map_string + MAP('key7', 'value1'), -- t_map_varchar + MAP('x', 'y'), -- t_map_char + MAP(3, 20), -- t_map_int + MAP(3, 200000000000), -- t_map_bigint MAP(CAST(3.2 AS FLOAT), CAST(20.2 AS FLOAT)), -- t_map_float MAP(CAST(3.2 AS DOUBLE), CAST(20.2 AS DOUBLE)), -- t_map_double - MAP(CAST(false AS BOOLEAN), CAST(true AS BOOLEAN)), -- t_map_boolean + MAP(false, true), -- t_map_boolean MAP(CAST(3.2 AS DECIMAL(2,1)), CAST(2.2 AS DECIMAL(2,1))), -- t_map_decimal_precision_2 MAP(CAST(3.34 AS DECIMAL(4,2)), CAST(2.34 AS DECIMAL(4,2))), -- t_map_decimal_precision_4 MAP(CAST(5.3456 AS DECIMAL(8,4)), CAST(2.3456 AS DECIMAL(8,4))), -- t_map_decimal_precision_8 MAP(CAST(5.34567890 AS DECIMAL(17,8)), CAST(2.34567890 AS DECIMAL(17,8))), -- t_map_decimal_precision_17 MAP(CAST(2.34567890 AS DECIMAL(18,8)), CAST(2.34567890 AS DECIMAL(18,8))), -- t_map_decimal_precision_18 MAP(CAST(7.345678901234567890 AS DECIMAL(38,16)), CAST(2.345678901234567890 AS DECIMAL(38,16))), -- t_map_decimal_precision_38 - ARRAY(CAST('string1' AS STRING), CAST('string2' AS STRING)), -- t_array_string - ARRAY(CAST(4 AS INT), CAST(5 AS INT), CAST(6 AS INT)), -- t_array_int - ARRAY(CAST(300000000000 AS BIGINT), CAST(400000000000 AS BIGINT)), -- t_array_bigint + ARRAY('string1', 'string2'), -- t_array_string + ARRAY(4, 5, 6), -- t_array_int + ARRAY(300000000000, 400000000000), -- t_array_bigint ARRAY(CAST(3.3 AS FLOAT), CAST(4.4 AS FLOAT)), -- t_array_float ARRAY(CAST(3.123456789 AS DOUBLE), CAST(4.123456789 AS DOUBLE)), -- t_array_double - ARRAY(CAST(false AS BOOLEAN), CAST(true AS BOOLEAN)), -- t_array_boolean - ARRAY(CAST('varchar1' AS VARCHAR(65535)), CAST('varchar2' AS VARCHAR(65535))), -- t_array_varchar - ARRAY(CAST('char1' AS CHAR(10)), CAST('char2' AS CHAR(10))), -- t_array_char + ARRAY(false, true), -- t_array_boolean + ARRAY('varchar1', 'varchar2'), -- t_array_varchar + ARRAY('char1', 'char2'), -- t_array_char ARRAY(CAST(3.3 AS DECIMAL(2,1)), CAST(4.4 AS DECIMAL(2,1))), -- t_array_decimal_precision_2 ARRAY(CAST(3.45 AS DECIMAL(4,2)), CAST(4.56 AS DECIMAL(4,2))), -- t_array_decimal_precision_4 ARRAY(CAST(9.4567 AS DECIMAL(8,4)), CAST(4.5678 AS DECIMAL(8,4))), -- t_array_decimal_precision_8 ARRAY(CAST(6.45678901 AS DECIMAL(17,8)), CAST(4.56789012 AS DECIMAL(17,8))), -- t_array_decimal_precision_17 ARRAY(CAST(3.45678901 AS DECIMAL(18,8)), CAST(4.56789012 AS DECIMAL(18,8))), -- t_array_decimal_precision_18 ARRAY(CAST(3.456789012345678901 AS DECIMAL(38,16)), CAST(4.567890123456789012 AS DECIMAL(38,16))), -- t_array_decimal_precision_38 - NAMED_STRUCT('s_bigint', CAST(-1234567890 AS BIGINT)), -- t_struct_bigint - MAP(CAST('key' AS STRING), ARRAY(NAMED_STRUCT('s_int', CAST(-123 AS INT)))), -- t_complex - NAMED_STRUCT('struct_field', ARRAY(CAST('value1' AS STRING), CAST('value2' AS STRING))), -- t_struct_nested - NAMED_STRUCT('struct_field_null', CAST(null AS STRING), 'struct_field_null2', CAST(null AS STRING)), -- t_struct_null - NAMED_STRUCT('struct_non_nulls_after_nulls1', CAST(-123 AS INT), 'struct_non_nulls_after_nulls2', CAST('value' AS STRING)), -- t_struct_non_nulls_after_nulls - NAMED_STRUCT('struct_field1', CAST(-123 AS INT), 'struct_field2', CAST('value' AS STRING), 'strict_field3', NAMED_STRUCT('nested_struct_field1', CAST(-123 AS INT), 'nested_struct_field2', CAST('nested_value' AS STRING))), -- t_nested_struct_non_nulls_after_nulls + NAMED_STRUCT('s_bigint', -1234567890), -- t_struct_bigint + MAP('key', ARRAY(NAMED_STRUCT('s_int', -123))), -- t_complex + NAMED_STRUCT('struct_field', ARRAY('value1', 'value2')), -- t_struct_nested + NAMED_STRUCT('struct_field_null', null, 'struct_field_null2', null), -- t_struct_null + NAMED_STRUCT('struct_non_nulls_after_nulls1', -123, 'struct_non_nulls_after_nulls2', 'value'), -- t_struct_non_nulls_after_nulls + NAMED_STRUCT('struct_field1', -123, 'struct_field2', 'value', 'strict_field3', NAMED_STRUCT('nested_struct_field1', -123, 'nested_struct_field2', 'nested_value')), -- t_nested_struct_non_nulls_after_nulls MAP('null_key', null), -- t_map_null_value - ARRAY(null, CAST('value1' AS STRING), CAST('value2' AS STRING)), -- t_array_string_starting_with_nulls - ARRAY(CAST('value1' AS STRING), null, CAST('value2' AS STRING)), -- t_array_string_with_nulls_in_between - ARRAY(CAST('value11' AS STRING), CAST('value2' AS STRING), null), -- t_array_string_ending_with_nulls + ARRAY(null, 'value1', 'value2'), -- t_array_string_starting_with_nulls + ARRAY('value1', null, 'value2'), -- t_array_string_with_nulls_in_between + ARRAY('value11', 'value2', null), -- t_array_string_ending_with_nulls ARRAY(null, null, null), -- t_array_string_all_nulls 20240325 -- dt ); @@ -381,10 +381,10 @@ suite("test_hive_write_insert", "p0,external,hive,external_docker,external_docke sql """ INSERT overwrite table all_types_${format_compression}(float_col, t_map_int, t_array_decimal_precision_8, t_array_string_starting_with_nulls, dt) VALUES ( - CAST(123.45 AS FLOAT), -- float_col - MAP(CAST(1 AS INT), CAST(10 AS INT)), -- t_map_int + 123.45, -- float_col + MAP(1, 10), -- t_map_int ARRAY(CAST(1.2345 AS DECIMAL(8,4)), CAST(2.3456 AS DECIMAL(8,4))), -- t_array_decimal_precision_8 - ARRAY(null, CAST('value1' AS STRING), CAST('value2' AS STRING)), -- t_array_string_starting_with_nulls + ARRAY(null, 'value1', 'value2'), -- t_array_string_starting_with_nulls 20240321 -- dt ); """ @@ -393,7 +393,6 @@ suite("test_hive_write_insert", "p0,external,hive,external_docker,external_docke logger.info("hive sql: " + """ truncate table all_types_${format_compression}; """) hive_docker """ truncate table all_types_${format_compression}; """ - sql """refresh catalog ${catalog_name};""" order_qt_q06 """ select * from all_types_${format_compression}; """ } @@ -445,7 +444,6 @@ suite("test_hive_write_insert", "p0,external,hive,external_docker,external_docke logger.info("hive sql: " + """ truncate table all_types_${format_compression}; """) hive_docker """ truncate table all_types_${format_compression}; """ - sql """refresh catalog ${catalog_name};""" order_qt_q05 """ select * from all_types_${format_compression}; """ @@ -460,376 +458,372 @@ suite("test_hive_write_insert", "p0,external,hive,external_docker,external_docke sql """ INSERT INTO all_types_par_${format_compression}_${catalog_name}_q03 VALUES ( - CAST(1 AS BOOLEAN), -- boolean_col - CAST(127 AS TINYINT), -- tinyint_col - CAST(32767 AS SMALLINT), -- smallint_col - CAST(2147483647 AS INT), -- int_col - CAST(9223372036854775807 AS BIGINT), -- bigint_col - CAST(123.45 AS FLOAT), -- float_col - CAST(123456.789 AS DOUBLE), -- double_col - CAST(123456789 AS DECIMAL(9,0)), -- decimal_col1 - CAST(1234.5678 AS DECIMAL(8,4)), -- decimal_col2 + 1, -- boolean_col + 127, -- tinyint_col + 32767, -- smallint_col + 2147483647, -- int_col + 9223372036854775807, -- bigint_col + 123.45, -- float_col + 123456.789, -- double_col + 123456789, -- decimal_col1 + 1234.5678, -- decimal_col2 CAST(123456.789012 AS DECIMAL(18,6)), -- decimal_col3 CAST(123456789.012345678901 AS DECIMAL(38,12)), -- decimal_col4 - CAST('string_value' AS STRING), -- string_col + 'string_value', -- string_col 'binary_value', -- binary_col '2024-03-20', -- date_col '2024-03-20 12:00:00', -- timestamp_col1 '2024-03-20 12:00:00.123456789', -- timestamp_col2 '2024-03-20 12:00:00.123456789', -- timestamp_col3 - CAST('char_value1' AS CHAR(50)), -- char_col1 - CAST('char_value2' AS CHAR(100)), -- char_col2 - CAST('char_value3' AS CHAR(255)), -- char_col3 - CAST('varchar_value1' AS VARCHAR(50)), -- varchar_col1 - CAST('varchar_value2' AS VARCHAR(100)), -- varchar_col2 - CAST('varchar_value3' AS VARCHAR(255)), -- varchar_col3 - MAP(CAST('key1' AS STRING), CAST('value1' AS STRING)), -- t_map_string - MAP(CAST('key1' AS VARCHAR(65535)), CAST('value1' AS VARCHAR(65535))), -- t_map_varchar - MAP(CAST('a' AS CHAR(10)), CAST('b' AS CHAR(10))), -- t_map_char - MAP(CAST(1 AS INT), CAST(10 AS INT)), -- t_map_int - MAP(CAST(1 AS BIGINT), CAST(100000000000 AS BIGINT)), -- t_map_bigint + 'char_value1', -- char_col1 + 'char_value2', -- char_col2 + 'char_value3', -- char_col3 + 'varchar_value1', -- varchar_col1 + 'varchar_value2', -- varchar_col2 + 'varchar_value3', -- varchar_col3 + MAP('key1', 'value1'), -- t_map_string + MAP('key1', 'value1'), -- t_map_varchar + MAP('a', 'b'), -- t_map_char + MAP(1, 10), -- t_map_int + MAP(1, 100000000000), -- t_map_bigint MAP(CAST(1.1 AS FLOAT), CAST(10.1 AS FLOAT)), -- t_map_float MAP(CAST(1.1 AS DOUBLE), CAST(10.1 AS DOUBLE)), -- t_map_double - MAP(CAST(true AS BOOLEAN), CAST(false AS BOOLEAN)), -- t_map_boolean + MAP(true, false), -- t_map_boolean MAP(CAST(1.1 AS DECIMAL(2,1)), CAST(1.1 AS DECIMAL(2,1))), -- t_map_decimal_precision_2 MAP(CAST(1.23 AS DECIMAL(4,2)), CAST(1.23 AS DECIMAL(4,2))), -- t_map_decimal_precision_4 MAP(CAST(1.2345 AS DECIMAL(8,4)), CAST(1.2345 AS DECIMAL(8,4))), -- t_map_decimal_precision_8 MAP(CAST(1.23456789 AS DECIMAL(17,8)), CAST(1.23456789 AS DECIMAL(17,8))), -- t_map_decimal_precision_17 MAP(CAST(1.23456789 AS DECIMAL(18,8)), CAST(1.23456789 AS DECIMAL(18,8))), -- t_map_decimal_precision_18 MAP(CAST(1.234567890123456789 AS DECIMAL(38,16)), CAST(1.234567890123456789 AS DECIMAL(38,16))), -- t_map_decimal_precision_38 - ARRAY(CAST('string1' AS STRING), CAST('string2' AS STRING)), -- t_array_string - ARRAY(CAST(1 AS INT), CAST(2 AS INT), CAST(3 AS INT)), -- t_array_int - ARRAY(CAST(100000000000 AS BIGINT), CAST(200000000000 AS BIGINT)), -- t_array_bigint + ARRAY('string1', 'string2'), -- t_array_string + ARRAY(1, 2, 3), -- t_array_int + ARRAY(100000000000, 200000000000), -- t_array_bigint ARRAY(CAST(1.1 AS FLOAT), CAST(2.2 AS FLOAT)), -- t_array_float ARRAY(CAST(1.123456789 AS DOUBLE), CAST(2.123456789 AS DOUBLE)), -- t_array_double - ARRAY(CAST(true AS BOOLEAN), CAST(false AS BOOLEAN)), -- t_array_boolean - ARRAY(CAST('varchar1' AS VARCHAR(65535)), CAST('varchar2' AS VARCHAR(65535))), -- t_array_varchar - ARRAY(CAST('char1' AS CHAR(10)), CAST('char2' AS CHAR(10))), -- t_array_char + ARRAY(true, false), -- t_array_boolean + ARRAY('varchar1', 'varchar2'), -- t_array_varchar + ARRAY('char1', 'char2'), -- t_array_char ARRAY(CAST(1.1 AS DECIMAL(2,1)), CAST(2.2 AS DECIMAL(2,1))), -- t_array_decimal_precision_2 ARRAY(CAST(1.23 AS DECIMAL(4,2)), CAST(2.34 AS DECIMAL(4,2))), -- t_array_decimal_precision_4 ARRAY(CAST(1.2345 AS DECIMAL(8,4)), CAST(2.3456 AS DECIMAL(8,4))), -- t_array_decimal_precision_8 ARRAY(CAST(1.23456789 AS DECIMAL(17,8)), CAST(2.34567891 AS DECIMAL(17,8))), -- t_array_decimal_precision_17 ARRAY(CAST(1.23456789 AS DECIMAL(18,8)), CAST(2.34567891 AS DECIMAL(18,8))), -- t_array_decimal_precision_18 ARRAY(CAST(1.234567890123456789 AS DECIMAL(38,16)), CAST(2.345678901234567890 AS DECIMAL(38,16))), -- t_array_decimal_precision_38 - NAMED_STRUCT('s_bigint', CAST(1234567890 AS BIGINT)), -- t_struct_bigint - MAP(CAST('key' AS STRING), ARRAY(NAMED_STRUCT('s_int', CAST(123 AS INT)))), -- t_complex - NAMED_STRUCT('struct_field', ARRAY(CAST('value1' AS STRING), CAST('value2' AS STRING))), -- t_struct_nested - NAMED_STRUCT('struct_field_null', CAST(null AS STRING), 'struct_field_null2', CAST(null AS STRING)), -- t_struct_null - NAMED_STRUCT('struct_non_nulls_after_nulls1', CAST(123 AS INT), 'struct_non_nulls_after_nulls2', CAST('value' AS STRING)), -- t_struct_non_nulls_after_nulls - NAMED_STRUCT('struct_field1', CAST(123 AS INT), 'struct_field2', CAST('value' AS STRING), 'strict_field3', NAMED_STRUCT('nested_struct_field1', CAST(123 AS INT), 'nested_struct_field2', CAST('nested_value' AS STRING))), -- t_nested_struct_non_nulls_after_nulls + NAMED_STRUCT('s_bigint', 1234567890), -- t_struct_bigint + MAP('key', ARRAY(NAMED_STRUCT('s_int', 123))), -- t_complex + NAMED_STRUCT('struct_field', ARRAY('value1', 'value2')), -- t_struct_nested + NAMED_STRUCT('struct_field_null', null, 'struct_field_null2', null), -- t_struct_null + NAMED_STRUCT('struct_non_nulls_after_nulls1', 123, 'struct_non_nulls_after_nulls2', 'value'), -- t_struct_non_nulls_after_nulls + NAMED_STRUCT('struct_field1', 123, 'struct_field2', 'value', 'strict_field3', NAMED_STRUCT('nested_struct_field1', 123, 'nested_struct_field2', 'nested_value')), -- t_nested_struct_non_nulls_after_nulls MAP('null_key', null), -- t_map_null_value - ARRAY(null, CAST('value1' AS STRING), CAST('value2' AS STRING)), -- t_array_string_starting_with_nulls - ARRAY(CAST('value1' AS STRING), null, CAST('value2' AS STRING)), -- t_array_string_with_nulls_in_between - ARRAY(CAST('value1' AS STRING), CAST('value2' AS STRING), null), -- t_array_string_ending_with_nulls + ARRAY(null, 'value1', 'value2'), -- t_array_string_starting_with_nulls + ARRAY('value1', null, 'value2'), -- t_array_string_with_nulls_in_between + ARRAY('value1', 'value2', null), -- t_array_string_ending_with_nulls ARRAY(null, null, null), -- t_array_string_all_nulls 20240320 -- dt ); """ order_qt_q01 """ select * from all_types_par_${format_compression}_${catalog_name}_q03; """ - //sql """refresh catalog ${catalog_name};""" sql """ - INSERT INTO all_types_par_${format_compression}_${catalog_name}_q03 + +INSERT INTO all_types_par_${format_compression}_${catalog_name}_q03 VALUES ( - CAST(1 AS BOOLEAN), -- boolean_col - CAST(127 AS TINYINT), -- tinyint_col - CAST(32767 AS SMALLINT), -- smallint_col - CAST(2147483647 AS INT), -- int_col - CAST(9223372036854775807 AS BIGINT), -- bigint_col + 1, -- boolean_col + 127, -- tinyint_col + 32767, -- smallint_col + 2147483647, -- int_col + 9223372036854775807, -- bigint_col CAST(123.45 AS FLOAT), -- float_col CAST(123456.789 AS DOUBLE), -- double_col CAST(123456789 AS DECIMAL(9,0)), -- decimal_col1 CAST(1234.5678 AS DECIMAL(8,4)), -- decimal_col2 CAST(123456.789012 AS DECIMAL(18,6)), -- decimal_col3 CAST(123456789.012345678901 AS DECIMAL(38,12)), -- decimal_col4 - CAST('string_value' AS STRING), -- string_col + 'string_value', -- string_col 'binary_value', -- binary_col '2024-03-20', -- date_col '2024-03-20 12:00:00', -- timestamp_col1 '2024-03-20 12:00:00.123456789', -- timestamp_col2 '2024-03-20 12:00:00.123456789', -- timestamp_col3 - CAST('char_value1' AS CHAR(50)), -- char_col1 - CAST('char_value2' AS CHAR(100)), -- char_col2 - CAST('char_value3' AS CHAR(255)), -- char_col3 - CAST('varchar_value1' AS VARCHAR(50)), -- varchar_col1 - CAST('varchar_value2' AS VARCHAR(100)), -- varchar_col2 - CAST('varchar_value3' AS VARCHAR(255)), -- varchar_col3 - MAP(CAST('key1' AS STRING), CAST('value1' AS STRING)), -- t_map_string - MAP(CAST('key1' AS VARCHAR(65535)), CAST('value1' AS VARCHAR(65535))), -- t_map_varchar - MAP(CAST('a' AS CHAR(10)), CAST('b' AS CHAR(10))), -- t_map_char - MAP(CAST(1 AS INT), CAST(10 AS INT)), -- t_map_int - MAP(CAST(1 AS BIGINT), CAST(100000000000 AS BIGINT)), -- t_map_bigint + 'char_value1', -- char_col1 + 'char_value2', -- char_col2 + 'char_value3', -- char_col3 + 'varchar_value1', -- varchar_col1 + 'varchar_value2', -- varchar_col2 + 'varchar_value3', -- varchar_col3 + MAP('key1', 'value1'), -- t_map_string + MAP('key1', 'value1'), -- t_map_varchar + MAP('a', 'b'), -- t_map_char + MAP(1, 10), -- t_map_int + MAP(1, 100000000000), -- t_map_bigint MAP(CAST(1.1 AS FLOAT), CAST(10.1 AS FLOAT)), -- t_map_float MAP(CAST(1.1 AS DOUBLE), CAST(10.1 AS DOUBLE)), -- t_map_double - MAP(CAST(true AS BOOLEAN), CAST(false AS BOOLEAN)), -- t_map_boolean + MAP(true, false), -- t_map_boolean MAP(CAST(1.1 AS DECIMAL(2,1)), CAST(1.1 AS DECIMAL(2,1))), -- t_map_decimal_precision_2 MAP(CAST(1.23 AS DECIMAL(4,2)), CAST(1.23 AS DECIMAL(4,2))), -- t_map_decimal_precision_4 MAP(CAST(1.2345 AS DECIMAL(8,4)), CAST(1.2345 AS DECIMAL(8,4))), -- t_map_decimal_precision_8 MAP(CAST(1.23456789 AS DECIMAL(17,8)), CAST(1.23456789 AS DECIMAL(17,8))), -- t_map_decimal_precision_17 MAP(CAST(1.23456789 AS DECIMAL(18,8)), CAST(1.23456789 AS DECIMAL(18,8))), -- t_map_decimal_precision_18 MAP(CAST(1.234567890123456789 AS DECIMAL(38,16)), CAST(1.234567890123456789 AS DECIMAL(38,16))), -- t_map_decimal_precision_38 - ARRAY(CAST('string1' AS STRING), CAST('string2' AS STRING)), -- t_array_string - ARRAY(CAST(1 AS INT), CAST(2 AS INT), CAST(3 AS INT)), -- t_array_int - ARRAY(CAST(100000000000 AS BIGINT), CAST(200000000000 AS BIGINT)), -- t_array_bigint + ARRAY('string1', 'string2'), -- t_array_string + ARRAY(1, 2, 3), -- t_array_int + ARRAY(100000000000, 200000000000), -- t_array_bigint ARRAY(CAST(1.1 AS FLOAT), CAST(2.2 AS FLOAT)), -- t_array_float ARRAY(CAST(1.123456789 AS DOUBLE), CAST(2.123456789 AS DOUBLE)), -- t_array_double - ARRAY(CAST(true AS BOOLEAN), CAST(false AS BOOLEAN)), -- t_array_boolean - ARRAY(CAST('varchar1' AS VARCHAR(65535)), CAST('varchar2' AS VARCHAR(65535))), -- t_array_varchar - ARRAY(CAST('char1' AS CHAR(10)), CAST('char2' AS CHAR(10))), -- t_array_char + ARRAY(true, false), -- t_array_boolean + ARRAY('varchar1', 'varchar2'), -- t_array_varchar + ARRAY('char1', 'char2'), -- t_array_char ARRAY(CAST(1.1 AS DECIMAL(2,1)), CAST(2.2 AS DECIMAL(2,1))), -- t_array_decimal_precision_2 ARRAY(CAST(1.23 AS DECIMAL(4,2)), CAST(2.34 AS DECIMAL(4,2))), -- t_array_decimal_precision_4 ARRAY(CAST(1.2345 AS DECIMAL(8,4)), CAST(2.3456 AS DECIMAL(8,4))), -- t_array_decimal_precision_8 ARRAY(CAST(1.23456789 AS DECIMAL(17,8)), CAST(2.34567891 AS DECIMAL(17,8))), -- t_array_decimal_precision_17 ARRAY(CAST(1.23456789 AS DECIMAL(18,8)), CAST(2.34567891 AS DECIMAL(18,8))), -- t_array_decimal_precision_18 ARRAY(CAST(1.234567890123456789 AS DECIMAL(38,16)), CAST(2.345678901234567890 AS DECIMAL(38,16))), -- t_array_decimal_precision_38 - NAMED_STRUCT('s_bigint', CAST(1234567890 AS BIGINT)), -- t_struct_bigint - MAP(CAST('key' AS STRING), ARRAY(NAMED_STRUCT('s_int', CAST(123 AS INT)))), -- t_complex - NAMED_STRUCT('struct_field', ARRAY(CAST('value1' AS STRING), CAST('value2' AS STRING))), -- t_struct_nested - NAMED_STRUCT('struct_field_null', CAST(null AS STRING), 'struct_field_null2', CAST(null AS STRING)), -- t_struct_null - NAMED_STRUCT('struct_non_nulls_after_nulls1', CAST(123 AS INT), 'struct_non_nulls_after_nulls2', CAST('value' AS STRING)), -- t_struct_non_nulls_after_nulls - NAMED_STRUCT('struct_field1', CAST(123 AS INT), 'struct_field2', CAST('value' AS STRING), 'strict_field3', NAMED_STRUCT('nested_struct_field1', CAST(123 AS INT), 'nested_struct_field2', CAST('nested_value' AS STRING))), -- t_nested_struct_non_nulls_after_nulls + NAMED_STRUCT('s_bigint', 1234567890), -- t_struct_bigint + MAP('key', ARRAY(NAMED_STRUCT('s_int', 123))), -- t_complex + NAMED_STRUCT('struct_field', ARRAY('value1', 'value2')), -- t_struct_nested + NAMED_STRUCT('struct_field_null', null, 'struct_field_null2', null), -- t_struct_null + NAMED_STRUCT('struct_non_nulls_after_nulls1', 123, 'struct_non_nulls_after_nulls2', 'value'), -- t_struct_non_nulls_after_nulls + NAMED_STRUCT('struct_field1', 123, 'struct_field2', 'value', 'strict_field3', NAMED_STRUCT('nested_struct_field1', 123, 'nested_struct_field2', 'nested_value')), -- t_nested_struct_non_nulls_after_nulls MAP('null_key', null), -- t_map_null_value - ARRAY(null, CAST('value1' AS STRING), CAST('value2' AS STRING)), -- t_array_string_starting_with_nulls - ARRAY(CAST('value1' AS STRING), null, CAST('value2' AS STRING)), -- t_array_string_with_nulls_in_between - ARRAY(CAST('value1' AS STRING), CAST('value2' AS STRING), null), -- t_array_string_ending_with_nulls + ARRAY(null, 'value1', 'value2'), -- t_array_string_starting_with_nulls + ARRAY('value1', null, 'value2'), -- t_array_string_with_nulls_in_between + ARRAY('value1', 'value2', null), -- t_array_string_ending_with_nulls ARRAY(null, null, null), -- t_array_string_all_nulls 20240320 -- dt ), ( - CAST(0 AS BOOLEAN), -- boolean_col - CAST(-128 AS TINYINT), -- tinyint_col - CAST(-32768 AS SMALLINT), -- smallint_col - CAST(-2147483648 AS INT), -- int_col - CAST(-9223372036854775808 AS BIGINT), -- bigint_col + 0, -- boolean_col + -128, -- tinyint_col + -32768, -- smallint_col + -2147483648, -- int_col + -9223372036854775808, -- bigint_col CAST(-123.45 AS FLOAT), -- float_col CAST(-123456.789 AS DOUBLE), -- double_col CAST(-123456789 AS DECIMAL(9,0)), -- decimal_col1 CAST(-1234.5678 AS DECIMAL(8,4)), -- decimal_col2 CAST(-123456.789012 AS DECIMAL(18,6)), -- decimal_col3 CAST(-123456789.012345678901 AS DECIMAL(38,12)), -- decimal_col4 - CAST('string_value' AS STRING), -- string_col + 'string_value', -- string_col 'binary_value', -- binary_col '2024-03-21', -- date_col '2024-03-21 12:00:00', -- timestamp_col1 '2024-03-21 12:00:00.123456789', -- timestamp_col2 '2024-03-21 12:00:00.123456789', -- timestamp_col3 - CAST('char_value1' AS CHAR(50)), -- char_col1 - CAST('char_value2' AS CHAR(100)), -- char_col2 - CAST('char_value3' AS CHAR(255)), -- char_col3 - CAST('varchar_value1' AS VARCHAR(50)), -- varchar_col1 - CAST('varchar_value2' AS VARCHAR(100)), -- varchar_col2 - CAST('varchar_value3' AS VARCHAR(255)), -- varchar_col3 - MAP(CAST('key1' AS STRING), CAST('value1' AS STRING)), -- t_map_string - MAP(CAST('key1' AS VARCHAR(65535)), CAST('value1' AS VARCHAR(65535))), -- t_map_varchar - MAP(CAST('x' AS CHAR(10)), CAST('y' AS CHAR(10))), -- t_map_char - MAP(CAST(2 AS INT), CAST(20 AS INT)), -- t_map_int - MAP(CAST(2 AS BIGINT), CAST(200000000000 AS BIGINT)), -- t_map_bigint + 'char_value1', -- char_col1 + 'char_value2', -- char_col2 + 'char_value3', -- char_col3 + 'varchar_value1', -- varchar_col1 + 'varchar_value2', -- varchar_col2 + 'varchar_value3', -- varchar_col3 + MAP('key1', 'value1'), -- t_map_string + MAP('key1', 'value1'), -- t_map_varchar + MAP('x', 'y'), -- t_map_char + MAP(2, 20), -- t_map_int + MAP(2, 200000000000), -- t_map_bigint MAP(CAST(2.2 AS FLOAT), CAST(20.2 AS FLOAT)), -- t_map_float MAP(CAST(2.2 AS DOUBLE), CAST(20.2 AS DOUBLE)), -- t_map_double - MAP(CAST(false AS BOOLEAN), CAST(true AS BOOLEAN)), -- t_map_boolean + MAP(false, true), -- t_map_boolean MAP(CAST(2.2 AS DECIMAL(2,1)), CAST(2.2 AS DECIMAL(2,1))), -- t_map_decimal_precision_2 MAP(CAST(2.34 AS DECIMAL(4,2)), CAST(2.34 AS DECIMAL(4,2))), -- t_map_decimal_precision_4 MAP(CAST(2.3456 AS DECIMAL(8,4)), CAST(2.3456 AS DECIMAL(8,4))), -- t_map_decimal_precision_8 MAP(CAST(2.34567890 AS DECIMAL(17,8)), CAST(2.34567890 AS DECIMAL(17,8))), -- t_map_decimal_precision_17 MAP(CAST(2.34567890 AS DECIMAL(18,8)), CAST(2.34567890 AS DECIMAL(18,8))), -- t_map_decimal_precision_18 MAP(CAST(2.345678901234567890 AS DECIMAL(38,16)), CAST(2.345678901234567890 AS DECIMAL(38,16))), -- t_map_decimal_precision_38 - ARRAY(CAST('string1' AS STRING), CAST('string2' AS STRING)), -- t_array_string - ARRAY(CAST(4 AS INT), CAST(5 AS INT), CAST(6 AS INT)), -- t_array_int - ARRAY(CAST(300000000000 AS BIGINT), CAST(400000000000 AS BIGINT)), -- t_array_bigint + ARRAY('string1', 'string2'), -- t_array_string + ARRAY(4, 5, 6), -- t_array_int + ARRAY(300000000000, 400000000000), -- t_array_bigint ARRAY(CAST(3.3 AS FLOAT), CAST(4.4 AS FLOAT)), -- t_array_float ARRAY(CAST(3.123456789 AS DOUBLE), CAST(4.123456789 AS DOUBLE)), -- t_array_double - ARRAY(CAST(false AS BOOLEAN), CAST(true AS BOOLEAN)), -- t_array_boolean - ARRAY(CAST('varchar1' AS VARCHAR(65535)), CAST('varchar2' AS VARCHAR(65535))), -- t_array_varchar - ARRAY(CAST('char1' AS CHAR(10)), CAST('char2' AS CHAR(10))), -- t_array_char + ARRAY(false, true), -- t_array_boolean + ARRAY('varchar1', 'varchar2'), -- t_array_varchar + ARRAY('char1', 'char2'), -- t_array_char ARRAY(CAST(3.3 AS DECIMAL(2,1)), CAST(4.4 AS DECIMAL(2,1))), -- t_array_decimal_precision_2 ARRAY(CAST(3.45 AS DECIMAL(4,2)), CAST(4.56 AS DECIMAL(4,2))), -- t_array_decimal_precision_4 ARRAY(CAST(3.4567 AS DECIMAL(8,4)), CAST(4.5678 AS DECIMAL(8,4))), -- t_array_decimal_precision_8 ARRAY(CAST(3.45678901 AS DECIMAL(17,8)), CAST(4.56789012 AS DECIMAL(17,8))), -- t_array_decimal_precision_17 ARRAY(CAST(3.45678901 AS DECIMAL(18,8)), CAST(4.56789012 AS DECIMAL(18,8))), -- t_array_decimal_precision_18 ARRAY(CAST(3.456789012345678901 AS DECIMAL(38,16)), CAST(4.567890123456789012 AS DECIMAL(38,16))), -- t_array_decimal_precision_38 - NAMED_STRUCT('s_bigint', CAST(-1234567890 AS BIGINT)), -- t_struct_bigint - MAP(CAST('key' AS STRING), ARRAY(NAMED_STRUCT('s_int', CAST(-123 AS INT)))), -- t_complex - NAMED_STRUCT('struct_field', ARRAY(CAST('value1' AS STRING), CAST('value2' AS STRING))), -- t_struct_nested - NAMED_STRUCT('struct_field_null', CAST(null AS STRING), 'struct_field_null2', CAST(null AS STRING)), -- t_struct_null - NAMED_STRUCT('struct_non_nulls_after_nulls1', CAST(-123 AS INT), 'struct_non_nulls_after_nulls2', CAST('value' AS STRING)), -- t_struct_non_nulls_after_nulls - NAMED_STRUCT('struct_field1', CAST(-123 AS INT), 'struct_field2', CAST('value' AS STRING), 'strict_field3', NAMED_STRUCT('nested_struct_field1', CAST(-123 AS INT), 'nested_struct_field2', CAST('nested_value' AS STRING))), -- t_nested_struct_non_nulls_after_nulls + NAMED_STRUCT('s_bigint', -1234567890), -- t_struct_bigint + MAP('key', ARRAY(NAMED_STRUCT('s_int', -123))), -- t_complex + NAMED_STRUCT('struct_field', ARRAY('value1', 'value2')), -- t_struct_nested + NAMED_STRUCT('struct_field_null', null, 'struct_field_null2', null), -- t_struct_null + NAMED_STRUCT('struct_non_nulls_after_nulls1', -123, 'struct_non_nulls_after_nulls2', 'value'), -- t_struct_non_nulls_after_nulls + NAMED_STRUCT('struct_field1', -123, 'struct_field2', 'value', 'strict_field3', NAMED_STRUCT('nested_struct_field1', -123, 'nested_struct_field2', 'nested_value')), -- t_nested_struct_non_nulls_after_nulls MAP('null_key', null), -- t_map_null_value - ARRAY(null, CAST('value1' AS STRING), CAST('value2' AS STRING)), -- t_array_string_starting_with_nulls - ARRAY(CAST('value1' AS STRING), null, CAST('value2' AS STRING)), -- t_array_string_with_nulls_in_between - ARRAY(CAST('value1' AS STRING), CAST('value2' AS STRING), null), -- t_array_string_ending_with_nulls + ARRAY(null, 'value1', 'value2'), -- t_array_string_starting_with_nulls + ARRAY('value1', null, 'value2'), -- t_array_string_with_nulls_in_between + ARRAY('value1', 'value2', null), -- t_array_string_ending_with_nulls ARRAY(null, null, null), -- t_array_string_all_nulls 20240321 -- dt ), ( - CAST(0 AS BOOLEAN), -- boolean_col - CAST(-128 AS TINYINT), -- tinyint_col - CAST(-32768 AS SMALLINT), -- smallint_col - CAST(-2147483648 AS INT), -- int_col - CAST(-9223372036854775808 AS BIGINT), -- bigint_col - CAST(-123.45 AS FLOAT), -- float_col - CAST(-123456.789 AS DOUBLE), -- double_col + 0, -- boolean_col + -128, -- tinyint_col + -32768, -- smallint_col + -2147483648, -- int_col + -9223372036854775808, -- bigint_col + -123.45, -- float_col + -123456.789, -- double_col CAST(-123456789 AS DECIMAL(9,0)), -- decimal_col1 CAST(-1234.5678 AS DECIMAL(8,4)), -- decimal_col2 CAST(-123456.789012 AS DECIMAL(18,6)), -- decimal_col3 CAST(-123456789.012345678901 AS DECIMAL(38,12)), -- decimal_col4 - CAST('string_value' AS STRING), -- string_col + 'string_value', -- string_col 'binary_value', -- binary_col '2024-03-22', -- date_col '2024-03-22 12:00:00', -- timestamp_col1 '2024-03-22 12:00:00.123456789', -- timestamp_col2 '2024-03-22 12:00:00.123456789', -- timestamp_col3 - CAST('char_value1' AS CHAR(50)), -- char_col1 - CAST('char_value2' AS CHAR(100)), -- char_col2 - CAST('char_value3' AS CHAR(255)), -- char_col3 - CAST('varchar_value1' AS VARCHAR(50)), -- varchar_col1 - CAST('varchar_value2' AS VARCHAR(100)), -- varchar_col2 - CAST('varchar_value3' AS VARCHAR(255)), -- varchar_col3 - MAP(CAST('key1' AS STRING), CAST('value1' AS STRING)), -- t_map_string - MAP(CAST('key1' AS VARCHAR(65535)), CAST('value1' AS VARCHAR(65535))), -- t_map_varchar - MAP(CAST('x' AS CHAR(10)), CAST('y' AS CHAR(10))), -- t_map_char - MAP(CAST(3 AS INT), CAST(20 AS INT)), -- t_map_int - MAP(CAST(3 AS BIGINT), CAST(200000000000 AS BIGINT)), -- t_map_bigint + 'char_value1', -- char_col1 + 'char_value2', -- char_col2 + 'char_value3', -- char_col3 + 'varchar_value1', -- varchar_col1 + 'varchar_value2', -- varchar_col2 + 'varchar_value3', -- varchar_col3 + MAP('key1', 'value1'), -- t_map_string + MAP('key1', 'value1'), -- t_map_varchar + MAP('x', 'y'), -- t_map_char + MAP(3, 20), -- t_map_int + MAP(3, 200000000000), -- t_map_bigint MAP(CAST(3.2 AS FLOAT), CAST(20.2 AS FLOAT)), -- t_map_float MAP(CAST(3.2 AS DOUBLE), CAST(20.2 AS DOUBLE)), -- t_map_double - MAP(CAST(false AS BOOLEAN), CAST(true AS BOOLEAN)), -- t_map_boolean + MAP(false, true), -- t_map_boolean MAP(CAST(3.2 AS DECIMAL(2,1)), CAST(2.2 AS DECIMAL(2,1))), -- t_map_decimal_precision_2 MAP(CAST(3.34 AS DECIMAL(4,2)), CAST(2.34 AS DECIMAL(4,2))), -- t_map_decimal_precision_4 MAP(CAST(2.3456 AS DECIMAL(8,4)), CAST(2.3456 AS DECIMAL(8,4))), -- t_map_decimal_precision_8 MAP(CAST(2.34567890 AS DECIMAL(17,8)), CAST(2.34567890 AS DECIMAL(17,8))), -- t_map_decimal_precision_17 MAP(CAST(2.34567890 AS DECIMAL(18,8)), CAST(2.34567890 AS DECIMAL(18,8))), -- t_map_decimal_precision_18 MAP(CAST(3.345678901234567890 AS DECIMAL(38,16)), CAST(2.345678901234567890 AS DECIMAL(38,16))), -- t_map_decimal_precision_38 - ARRAY(CAST('string1' AS STRING), CAST('string2' AS STRING)), -- t_array_string - ARRAY(CAST(4 AS INT), CAST(5 AS INT), CAST(6 AS INT)), -- t_array_int - ARRAY(CAST(300000000000 AS BIGINT), CAST(400000000000 AS BIGINT)), -- t_array_bigint + ARRAY('string1', 'string2'), -- t_array_string + ARRAY(4, 5, 6), -- t_array_int + ARRAY(300000000000, 400000000000), -- t_array_bigint ARRAY(CAST(3.3 AS FLOAT), CAST(4.4 AS FLOAT)), -- t_array_float ARRAY(CAST(3.123456789 AS DOUBLE), CAST(4.123456789 AS DOUBLE)), -- t_array_double - ARRAY(CAST(false AS BOOLEAN), CAST(true AS BOOLEAN)), -- t_array_boolean - ARRAY(CAST('varchar1' AS VARCHAR(65535)), CAST('varchar2' AS VARCHAR(65535))), -- t_array_varchar - ARRAY(CAST('char1' AS CHAR(10)), CAST('char2' AS CHAR(10))), -- t_array_char + ARRAY(false, true), -- t_array_boolean + ARRAY('varchar1', 'varchar2'), -- t_array_varchar + ARRAY('char1', 'char2'), -- t_array_char ARRAY(CAST(3.3 AS DECIMAL(2,1)), CAST(4.4 AS DECIMAL(2,1))), -- t_array_decimal_precision_2 ARRAY(CAST(3.45 AS DECIMAL(4,2)), CAST(4.56 AS DECIMAL(4,2))), -- t_array_decimal_precision_4 ARRAY(CAST(8.4567 AS DECIMAL(8,4)), CAST(4.5678 AS DECIMAL(8,4))), -- t_array_decimal_precision_8 ARRAY(CAST(3.45678901 AS DECIMAL(17,8)), CAST(4.56789012 AS DECIMAL(17,8))), -- t_array_decimal_precision_17 ARRAY(CAST(3.45678901 AS DECIMAL(18,8)), CAST(4.56789012 AS DECIMAL(18,8))), -- t_array_decimal_precision_18 ARRAY(CAST(3.456789012345678901 AS DECIMAL(38,16)), CAST(4.567890123456789012 AS DECIMAL(38,16))), -- t_array_decimal_precision_38 - NAMED_STRUCT('s_bigint', CAST(-1234567890 AS BIGINT)), -- t_struct_bigint - MAP(CAST('key' AS STRING), ARRAY(NAMED_STRUCT('s_int', CAST(-123 AS INT)))), -- t_complex - NAMED_STRUCT('struct_field', ARRAY(CAST('value1' AS STRING), CAST('value2' AS STRING))), -- t_struct_nested - NAMED_STRUCT('struct_field_null', CAST(null AS STRING), 'struct_field_null2', CAST(null AS STRING)), -- t_struct_null - NAMED_STRUCT('struct_non_nulls_after_nulls1', CAST(-123 AS INT), 'struct_non_nulls_after_nulls2', CAST('value' AS STRING)), -- t_struct_non_nulls_after_nulls - NAMED_STRUCT('struct_field1', CAST(-123 AS INT), 'struct_field2', CAST('value' AS STRING), 'strict_field3', NAMED_STRUCT('nested_struct_field1', CAST(-123 AS INT), 'nested_struct_field2', CAST('nested_value' AS STRING))), -- t_nested_struct_non_nulls_after_nulls + NAMED_STRUCT('s_bigint', -1234567890), -- t_struct_bigint + MAP('key', ARRAY(NAMED_STRUCT('s_int', -123))), -- t_complex + NAMED_STRUCT('struct_field', ARRAY('value1', 'value2')), -- t_struct_nested + NAMED_STRUCT('struct_field_null', null, 'struct_field_null2', null), -- t_struct_null + NAMED_STRUCT('struct_non_nulls_after_nulls1', -123, 'struct_non_nulls_after_nulls2', 'value'), -- t_struct_non_nulls_after_nulls + NAMED_STRUCT('struct_field1', -123, 'struct_field2', 'value', 'strict_field3', NAMED_STRUCT('nested_struct_field1', -123, 'nested_struct_field2', 'nested_value')), -- t_nested_struct_non_nulls_after_nulls MAP('null_key', null), -- t_map_null_value - ARRAY(null, CAST('value1' AS STRING), CAST('value2' AS STRING)), -- t_array_string_starting_with_nulls - ARRAY(CAST('value1' AS STRING), null, CAST('value2' AS STRING)), -- t_array_string_with_nulls_in_between - ARRAY(CAST('value11' AS STRING), CAST('value2' AS STRING), null), -- t_array_string_ending_with_nulls + ARRAY(null, 'value1', 'value2'), -- t_array_string_starting_with_nulls + ARRAY('value1', null, 'value2'), -- t_array_string_with_nulls_in_between + ARRAY('value11', 'value2', null), -- t_array_string_ending_with_nulls ARRAY(null, null, null), -- t_array_string_all_nulls 20240322 -- dt ); """ order_qt_q02 """ select * from all_types_par_${format_compression}_${catalog_name}_q03; """ -// disable it temporarily -// sql """refresh catalog ${catalog_name};""" - -// sql """ -// INSERT INTO all_types_par_${format_compression}_${catalog_name}_q03(float_col, t_map_int, t_array_decimal_precision_8, t_array_string_starting_with_nulls, dt) -// VALUES ( -// CAST(123.45 AS FLOAT), -- float_col -// MAP(CAST(1 AS INT), CAST(10 AS INT)), -- t_map_int -// ARRAY(CAST(1.2345 AS DECIMAL(8,4)), CAST(2.3456 AS DECIMAL(8,4))), -- t_array_decimal_precision_8 -// ARRAY(null, CAST('value1' AS STRING), CAST('value2' AS STRING)), -- t_array_string_starting_with_nulls -// 20240321 -- dt -// ); -// """ -// order_qt_q03 """ select * from all_types_par_${format_compression}_${catalog_name}_q03; -// """ + + sql """ + INSERT INTO all_types_par_${format_compression}_${catalog_name}_q03(float_col, t_map_int, t_array_decimal_precision_8, t_array_string_starting_with_nulls, dt) + VALUES ( + 123.45, -- float_col + MAP(1, 10), -- t_map_int + ARRAY(CAST(1.2345 AS DECIMAL(8,4)), CAST(2.3456 AS DECIMAL(8,4))), -- t_array_decimal_precision_8 + ARRAY(null, 'value1', 'value2'), -- t_array_string_starting_with_nulls + 20240321 -- dt + ); + """ + order_qt_q03 """ select * from all_types_par_${format_compression}_${catalog_name}_q03; + """ sql """ insert overwrite table all_types_par_${format_compression}_${catalog_name}_q03 VALUES ( - CAST(0 AS BOOLEAN), -- boolean_col - CAST(-7 AS TINYINT), -- tinyint_col - CAST(-15 AS SMALLINT), -- smallint_col - CAST(16 AS INT), -- int_col - CAST(-9223372036854775808 AS BIGINT), -- bigint_col + 0, -- boolean_col + -7, -- tinyint_col + -15, -- smallint_col + 16, -- int_col + -9223372036854775808, -- bigint_col CAST(-123.45 AS FLOAT), -- float_col CAST(-123456.789 AS DOUBLE), -- double_col CAST(123456789 AS DECIMAL(9,0)), -- decimal_col1 CAST(-1234.5678 AS DECIMAL(8,4)), -- decimal_col2 CAST(-123456.789012 AS DECIMAL(18,6)), -- decimal_col3 CAST(-123456789.012345678901 AS DECIMAL(38,12)), -- decimal_col4 - CAST('str' AS STRING), -- string_col + 'str', -- string_col 'binary_value', -- binary_col '2024-03-25', -- date_col '2024-03-25 12:00:00', -- timestamp_col1 '2024-03-25 12:00:00.123456789', -- timestamp_col2 '2024-03-25 12:00:00.123456789', -- timestamp_col3 - CAST('char_value11111' AS CHAR(50)), -- char_col1 - CAST('char_value22222' AS CHAR(100)), -- char_col2 - CAST('char_value33333' AS CHAR(255)), -- char_col3 - CAST('varchar_value11111' AS VARCHAR(50)), -- varchar_col1 - CAST('varchar_value22222' AS VARCHAR(100)), -- varchar_col2 - CAST('varchar_value33333' AS VARCHAR(255)), -- varchar_col3 - MAP(CAST('key7' AS STRING), CAST('value1' AS STRING)), -- t_map_string - MAP(CAST('key7' AS VARCHAR(65535)), CAST('value1' AS VARCHAR(65535))), -- t_map_varchar - MAP(CAST('x' AS CHAR(10)), CAST('y' AS CHAR(10))), -- t_map_char - MAP(CAST(3 AS INT), CAST(20 AS INT)), -- t_map_int - MAP(CAST(3 AS BIGINT), CAST(200000000000 AS BIGINT)), -- t_map_bigint + 'char_value11111', -- char_col1 + 'char_value22222', -- char_col2 + 'char_value33333', -- char_col3 + 'varchar_value11111', -- varchar_col1 + 'varchar_value22222', -- varchar_col2 + 'varchar_value33333', -- varchar_col3 + MAP('key7', 'value1'), -- t_map_string + MAP('key7', 'value1'), -- t_map_varchar + MAP('x', 'y'), -- t_map_char + MAP(3, 20), -- t_map_int + MAP(3, 200000000000), -- t_map_bigint MAP(CAST(3.2 AS FLOAT), CAST(20.2 AS FLOAT)), -- t_map_float MAP(CAST(3.2 AS DOUBLE), CAST(20.2 AS DOUBLE)), -- t_map_double - MAP(CAST(false AS BOOLEAN), CAST(true AS BOOLEAN)), -- t_map_boolean + MAP(false, true), -- t_map_boolean MAP(CAST(3.2 AS DECIMAL(2,1)), CAST(2.2 AS DECIMAL(2,1))), -- t_map_decimal_precision_2 MAP(CAST(3.34 AS DECIMAL(4,2)), CAST(2.34 AS DECIMAL(4,2))), -- t_map_decimal_precision_4 MAP(CAST(5.3456 AS DECIMAL(8,4)), CAST(2.3456 AS DECIMAL(8,4))), -- t_map_decimal_precision_8 MAP(CAST(5.34567890 AS DECIMAL(17,8)), CAST(2.34567890 AS DECIMAL(17,8))), -- t_map_decimal_precision_17 MAP(CAST(2.34567890 AS DECIMAL(18,8)), CAST(2.34567890 AS DECIMAL(18,8))), -- t_map_decimal_precision_18 MAP(CAST(7.345678901234567890 AS DECIMAL(38,16)), CAST(2.345678901234567890 AS DECIMAL(38,16))), -- t_map_decimal_precision_38 - ARRAY(CAST('string1' AS STRING), CAST('string2' AS STRING)), -- t_array_string - ARRAY(CAST(4 AS INT), CAST(5 AS INT), CAST(6 AS INT)), -- t_array_int - ARRAY(CAST(300000000000 AS BIGINT), CAST(400000000000 AS BIGINT)), -- t_array_bigint + ARRAY('string1', 'string2'), -- t_array_string + ARRAY(4, 5, 6), -- t_array_int + ARRAY(300000000000, 400000000000), -- t_array_bigint ARRAY(CAST(3.3 AS FLOAT), CAST(4.4 AS FLOAT)), -- t_array_float ARRAY(CAST(3.123456789 AS DOUBLE), CAST(4.123456789 AS DOUBLE)), -- t_array_double - ARRAY(CAST(false AS BOOLEAN), CAST(true AS BOOLEAN)), -- t_array_boolean - ARRAY(CAST('varchar1' AS VARCHAR(65535)), CAST('varchar2' AS VARCHAR(65535))), -- t_array_varchar - ARRAY(CAST('char1' AS CHAR(10)), CAST('char2' AS CHAR(10))), -- t_array_char + ARRAY(false, true), -- t_array_boolean + ARRAY('varchar1', 'varchar2'), -- t_array_varchar + ARRAY('char1', 'char2'), -- t_array_char ARRAY(CAST(3.3 AS DECIMAL(2,1)), CAST(4.4 AS DECIMAL(2,1))), -- t_array_decimal_precision_2 ARRAY(CAST(3.45 AS DECIMAL(4,2)), CAST(4.56 AS DECIMAL(4,2))), -- t_array_decimal_precision_4 ARRAY(CAST(9.4567 AS DECIMAL(8,4)), CAST(4.5678 AS DECIMAL(8,4))), -- t_array_decimal_precision_8 ARRAY(CAST(6.45678901 AS DECIMAL(17,8)), CAST(4.56789012 AS DECIMAL(17,8))), -- t_array_decimal_precision_17 ARRAY(CAST(3.45678901 AS DECIMAL(18,8)), CAST(4.56789012 AS DECIMAL(18,8))), -- t_array_decimal_precision_18 ARRAY(CAST(3.456789012345678901 AS DECIMAL(38,16)), CAST(4.567890123456789012 AS DECIMAL(38,16))), -- t_array_decimal_precision_38 - NAMED_STRUCT('s_bigint', CAST(-1234567890 AS BIGINT)), -- t_struct_bigint - MAP(CAST('key' AS STRING), ARRAY(NAMED_STRUCT('s_int', CAST(-123 AS INT)))), -- t_complex - NAMED_STRUCT('struct_field', ARRAY(CAST('value1' AS STRING), CAST('value2' AS STRING))), -- t_struct_nested - NAMED_STRUCT('struct_field_null', CAST(null AS STRING), 'struct_field_null2', CAST(null AS STRING)), -- t_struct_null - NAMED_STRUCT('struct_non_nulls_after_nulls1', CAST(-123 AS INT), 'struct_non_nulls_after_nulls2', CAST('value' AS STRING)), -- t_struct_non_nulls_after_nulls - NAMED_STRUCT('struct_field1', CAST(-123 AS INT), 'struct_field2', CAST('value' AS STRING), 'strict_field3', NAMED_STRUCT('nested_struct_field1', CAST(-123 AS INT), 'nested_struct_field2', CAST('nested_value' AS STRING))), -- t_nested_struct_non_nulls_after_nulls + NAMED_STRUCT('s_bigint', -1234567890), -- t_struct_bigint + MAP('key', ARRAY(NAMED_STRUCT('s_int', -123))), -- t_complex + NAMED_STRUCT('struct_field', ARRAY('value1', 'value2')), -- t_struct_nested + NAMED_STRUCT('struct_field_null', null, 'struct_field_null2', null), -- t_struct_null + NAMED_STRUCT('struct_non_nulls_after_nulls1', -123, 'struct_non_nulls_after_nulls2', 'value'), -- t_struct_non_nulls_after_nulls + NAMED_STRUCT('struct_field1', -123, 'struct_field2', 'value', 'strict_field3', NAMED_STRUCT('nested_struct_field1', -123, 'nested_struct_field2', 'nested_value')), -- t_nested_struct_non_nulls_after_nulls MAP('null_key', null), -- t_map_null_value - ARRAY(null, CAST('value1' AS STRING), CAST('value2' AS STRING)), -- t_array_string_starting_with_nulls - ARRAY(CAST('value1' AS STRING), null, CAST('value2' AS STRING)), -- t_array_string_with_nulls_in_between - ARRAY(CAST('value11' AS STRING), CAST('value2' AS STRING), null), -- t_array_string_ending_with_nulls + ARRAY(null, 'value1', 'value2'), -- t_array_string_starting_with_nulls + ARRAY('value1', null, 'value2'), -- t_array_string_with_nulls_in_between + ARRAY('value11', 'value2', null), -- t_array_string_ending_with_nulls ARRAY(null, null, null), -- t_array_string_all_nulls 20240321 -- dt ); """ order_qt_q04 """ select * from all_types_par_${format_compression}_${catalog_name}_q03; """ -// disable it temporarily -// sql """refresh catalog ${catalog_name};""" -// -// sql """ -// INSERT overwrite table all_types_par_${format_compression}_${catalog_name}_q03(float_col, t_map_int, t_array_decimal_precision_8, t_array_string_starting_with_nulls, dt) -// VALUES ( -// CAST(123.45 AS FLOAT), -- float_col -// MAP(CAST(1 AS INT), CAST(10 AS INT)), -- t_map_int -// ARRAY(CAST(1.2345 AS DECIMAL(8,4)), CAST(2.3456 AS DECIMAL(8,4))), -- t_array_decimal_precision_8 -// ARRAY(null, CAST('value1' AS STRING), CAST('value2' AS STRING)), -- t_array_string_starting_with_nulls -// 20240321 -- dt -// ); -// """ -// order_qt_q05 """ select * from all_types_par_${format_compression}_${catalog_name}_q03; -// """ + + sql """ + INSERT overwrite table all_types_par_${format_compression}_${catalog_name}_q03(float_col, t_map_int, t_array_decimal_precision_8, t_array_string_starting_with_nulls, dt) + VALUES ( + CAST(123.45 AS FLOAT), -- float_col + MAP(1, 10), -- t_map_int + ARRAY(CAST(1.2345 AS DECIMAL(8,4)), CAST(2.3456 AS DECIMAL(8,4))), -- t_array_decimal_precision_8 + ARRAY(null, 'value1', 'value2'), -- t_array_string_starting_with_nulls + 20240321 -- dt + ); + """ + order_qt_q05 """ select * from all_types_par_${format_compression}_${catalog_name}_q03; + """ logger.info("hive sql: " + """ DROP TABLE IF EXISTS all_types_par_${format_compression}_${catalog_name}_q03; """) hive_docker """ DROP TABLE IF EXISTS all_types_par_${format_compression}_${catalog_name}_q03; """ @@ -848,7 +842,6 @@ suite("test_hive_write_insert", "p0,external,hive,external_docker,external_docke """ order_qt_q01 """ select * from all_types_par_${format_compression}_${catalog_name}_q04; """ - //sql """refresh catalog ${catalog_name};""" sql """ INSERT INTO all_types_par_${format_compression}_${catalog_name}_q04 @@ -866,24 +859,21 @@ suite("test_hive_write_insert", "p0,external,hive,external_docker,external_docke """ order_qt_q02 """ select * from all_types_par_${format_compression}_${catalog_name}_q04; """ - //sql """refresh catalog ${catalog_name};""" - - //sql """ - //INSERT INTO all_types_par_${format_compression}_${catalog_name}_q04(float_col, t_map_int, t_array_decimal_precision_8, t_array_string_starting_with_nulls, dt) - //SELECT float_col, t_map_int, t_array_decimal_precision_8, t_array_string_starting_with_nulls, dt FROM all_types_parquet_snappy_src; - //""" - //order_qt_q03 """ select * from all_types_par_${format_compression}_${catalog_name}_q04; - //""" - //sql """refresh catalog ${catalog_name};""" - - //sql """ - //INSERT OVERWRITE TABLE all_types_par_${format_compression}_${catalog_name}_q04(float_col, t_map_int, t_array_decimal_precision_8, t_array_string_starting_with_nulls, dt) - //SELECT float_col, t_map_int, t_array_decimal_precision_8, t_array_string_starting_with_nulls, dt FROM all_types_parquet_snappy_src; - //""" - //order_qt_q04 """ - //select * from all_types_par_${format_compression}_${catalog_name}_q04; - //""" - //sql """refresh catalog ${catalog_name};""" + + sql """ + INSERT INTO all_types_par_${format_compression}_${catalog_name}_q04(float_col, t_map_int, t_array_decimal_precision_8, t_array_string_starting_with_nulls, dt) + SELECT float_col, t_map_int, t_array_decimal_precision_8, t_array_string_starting_with_nulls, dt FROM all_types_parquet_snappy_src; + """ + order_qt_q03 """ select * from all_types_par_${format_compression}_${catalog_name}_q04; + """ + + sql """ + INSERT OVERWRITE TABLE all_types_par_${format_compression}_${catalog_name}_q04(float_col, t_map_int, t_array_decimal_precision_8, t_array_string_starting_with_nulls, dt) + SELECT float_col, t_map_int, t_array_decimal_precision_8, t_array_string_starting_with_nulls, dt FROM all_types_parquet_snappy_src; + """ + order_qt_q04 """ + select * from all_types_par_${format_compression}_${catalog_name}_q04; + """ logger.info("hive sql: " + """ DROP TABLE IF EXISTS all_types_par_${format_compression}_${catalog_name}_q04; """) hive_docker """ DROP TABLE IF EXISTS all_types_par_${format_compression}_${catalog_name}_q04; """ diff --git a/regression-test/suites/external_table_p0/hive/write/test_hive_write_partitions.groovy b/regression-test/suites/external_table_p0/hive/write/test_hive_write_partitions.groovy index d2baf6ddc61..4e2d3bdd37e 100644 --- a/regression-test/suites/external_table_p0/hive/write/test_hive_write_partitions.groovy +++ b/regression-test/suites/external_table_p0/hive/write/test_hive_write_partitions.groovy @@ -214,8 +214,7 @@ suite("test_hive_write_partitions", "p0,external,hive,external_docker,external_d q01(format_compression, catalog_name) q02(format_compression, catalog_name) q03(format_compression, catalog_name) -// disable it temporarily -// q04(format_compression, catalog_name) + q04(format_compression, catalog_name) } sql """drop catalog if exists ${catalog_name}""" } finally { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org