bitmap类型设置默认值后,数据导入报错can not cast from origin type bitmap to target type=varchar(65533)

Viewed 2

创建表:
CREATE TABLE test (
id bigint NULL,
id2 bigint NULL,
create_time datetime NULL,
bitmap1 bitmap NOT NULL DEFAULT BITMAP_EMPTY
) ENGINE=OLAP
UNIQUE KEY(id, id2, create_time)
PARTITION BY RANGE(create_time)
(PARTITION p2025_48 VALUES [('2025-11-24 00:00:00'), ('2025-12-01 00:00:00')),
PARTITION p2025_49 VALUES [('2025-12-01 00:00:00'), ('2025-12-08 00:00:00')),
PARTITION p2025_50 VALUES [('2025-12-08 00:00:00'), ('2025-12-15 00:00:00')))
DISTRIBUTED BY HASH(id, id2) BUCKETS AUTO
PROPERTIES (
"replication_allocation" = "tag.location.default: 1",
"min_load_replica_num" = "-1",
"is_being_synced" = "false",
"dynamic_partition.enable" = "true",
"dynamic_partition.time_unit" = "WEEK",
"dynamic_partition.time_zone" = "Asia/Chongqing",
"dynamic_partition.start" = "-1",
"dynamic_partition.end" = "1",
"dynamic_partition.prefix" = "p",
"dynamic_partition.replication_allocation" = "tag.location.default: 1",
"dynamic_partition.buckets" = "2",
"dynamic_partition.create_history_partition" = "true",
"dynamic_partition.history_partition_num" = "-1",
"dynamic_partition.hot_partition_num" = "0",
"dynamic_partition.reserved_history_periods" = "NULL",
"dynamic_partition.storage_policy" = "",
"dynamic_partition.start_day_of_week" = "1",
"storage_medium" = "ssd",
"storage_format" = "V2",
"inverted_index_storage_format" = "V1",
"estimate_partition_size" = "50G",
"enable_unique_key_merge_on_write" = "true",
"light_schema_change" = "true",
"disable_auto_compaction" = "false",
"enable_single_replica_compaction" = "false",
"group_commit_interval_ms" = "10000",
"group_commit_data_bytes" = "134217728",
"enable_mow_light_delete" = "false"
);

导入数据中不包含bitmap1字段
cat 1.csv
111 222 2025-12-02 11:29:59

导入数据测试验证:
curl --location-trusted -u : -T 1.csv http://localhost:8030/api/test/test/_stream_load
{
"TxnId": 21114,
"Label": "da5364b4-0b93-4553-a1ae-27e4feddfcf2",
"Comment": "",
"TwoPhaseCommit": "false",
"Status": "Fail",
"Message": "[ANALYSIS_ERROR]TStatus: errCode = 2, detailMessage = can not cast from origin type bitmap to target type=varchar(65533)",
"NumberTotalRows": 0,
"NumberLoadedRows": 0,
"NumberFilteredRows": 0,
"NumberUnselectedRows": 0,
"LoadBytes": 0,
"LoadTimeMs": 0,
"BeginTxnTimeMs": 1,
"StreamLoadPutTimeMs": 11,
"ReadDataTimeMs": 0,
"WriteDataTimeMs": 0,
"ReceiveDataTimeMs": 0,
"CommitAndPublishTimeMs": 0
}

请问如何解决此问题?

0 Answers