StarRocks / starrocks

StarRocks, a Linux Foundation project, is a next-generation sub-second MPP OLAP database for full analytics scenarios, including multi-dimensional analytics, real-time analytics, and ad-hoc queries.
https://starrocks.io
Apache License 2.0
8.61k stars 1.74k forks source link

【bug】streamLoad 下default无法生效 #33932

Closed sudufly closed 3 months ago

sudufly commented 10 months ago

Steps to reproduce the behavior (Required)

CREATE TABLE test ( tenant_id varchar(32) NOT NULL COMMENT '租户id', device_sn varchar(32) NOT NULL COMMENT '设备序列号', code varchar(32) NOT NULL COMMENT '故障码,16进制字符串不包含0x', data_time datetime NULL COMMENT '精确到小时', count bigint(20) SUM NULL DEFAULT "1" COMMENT '次数' ) ENGINE=OLAP AGGREGATE KEY(tenant_id, device_sn, code, data_time) COMMENT 'OLAP' PARTITION BY RANGE(data_time) (PARTITION p_202310 VALUES [('2023-10-01 00:00:00'), ('2023-11-01 00:00:00')), PARTITION p_202311 VALUES [('2023-11-01 00:00:00'), ('2023-12-01 00:00:00')), PARTITION p_202312 VALUES [('2023-12-01 00:00:00'), ('2024-01-01 00:00:00'))) DISTRIBUTED BY HASH(device_sn) BUCKETS 16 PROPERTIES ( "replication_num" = "1", "dynamic_partition.enable" = "true", "dynamic_partition.time_unit" = "month", "dynamic_partition.time_zone" = "Asia/Shanghai", "dynamic_partition.start" = "-2147483648", "dynamic_partition.end" = "2", "dynamicpartition.prefix" = "p",

"dynamic_partition.buckets" = "16"

);

1.streamLoad 情况下,count 字段无法生成默认值 2 jdbc 执行能够正常生成默认值

Expected behavior (Required)

count 为空

Real behavior (Required)

count 不为空

StarRocks version (Required)

chaoyli commented 10 months ago

@rickif is focusing on this issue.

rickif commented 10 months ago

Could you give me an example of the stream load request?

github-actions[bot] commented 4 months ago

We have marked this issue as stale because it has been inactive for 6 months. If this issue is still relevant, removing the stale label or adding a comment will keep it active. Otherwise, we'll close it in 10 days to keep the issue queue tidy. Thank you for your contribution to StarRocks!