4.0.4 stream load 报错: can not cast from origin type bitmap to target type=varchar(65533)

Viewed 5

版本:
doris-4.0.4

问题描述:
建表语句中包含bitmap类型,导入时使用to_bitmap提供值,但会报语法错误

[ANALYSIS_ERROR]TStatus: errCode = 2, detailMessage = can not cast from origin type BITMAP to target type=VARCHAR(65533)

建表:

create table test_load_bitmap
(`user_id` varchar(100),
 `user_id_bitmap` bitmap
);

加载:

-H "format: json"
-H "jsonpaths:[\"$.user_id\"]"
-H "columns:user_id,user_id_bitmap=to_bitmap(bitmap_hash64(user_id))"


stream load 不支持 json 转换为 to_bitmap 类型么?json 格式如何导入 bitmap格式呢?

1 Answers

经过测试
to_bitmap(bitmap_hash64(user_id)) 这样是不行的,会报错

但是使用 bitmap_hash64(user_id) 这样就不报错了