Open wanqiang2046 opened 1 year ago
最后定位到是cod decimalv3(15, 2) NOT NULL DEFAULT "0.00" COMMENT '代收货款', 这个字段导致的,当用cod != 0 查询的时候直接全部挂掉。。。 把decimalv3改成decimal就不挂了
Hi @wanqiang2046, I can't reproduce the error in the latest master branch code. It is speculated that this error has been fixed. You can try to run this sql statement on the upcoming version 1.2.2.
ok, thanks, I can only look forward to the early release of version 1.2.2.
Search before asking
Version
doris-1.2.1-rc01-Unknown
What's Wrong?
使用下面查询语句的时候,BE节点全部挂掉 SELECT COUNT(0) FROM (SELECT sku, name_en, customer_code, SUM(cod) AS cod, SUM(quantity) AS quantity, IFNULL(SUM(CASE WHEN STATUS = 5 THEN quantity END), 0) AS sign_count, IFNULL(SUM(CASE WHEN return_sign_date IS NOT NULL THEN quantity END), 0) AS return_count FROM dwd_bi_order_sku_detail WHERE 1 = 1 AND country_code = 'NG' AND cod != 0 AND rec_date >= '2023-02-01 00:00:00' AND rec_date <= '2023-02-10 23:59:59' AND enable_flag = 0 GROUP BY customer_code, sku, name_en) t
建表语句如下:
CREATE TABLE
dwd_bi_order_sku_detail
(good_id
varchar(64) NOT NULL COMMENT '订单物品表主键',rec_date
datetimev2(0) NOT NULL DEFAULT "0001-01-01 00:00:00" COMMENT '揽收时间',bill_code
varchar(40) NOT NULL COMMENT '运单号',order_code
varchar(40) NOT NULL DEFAULT "" COMMENT '订单号',country_code
varchar(40) NOT NULL COMMENT '国家编号',country_name
varchar(40) NOT NULL COMMENT '国家名称',customer_code
varchar(40) NOT NULL COMMENT '客户编号',customer_name
varchar(40) NOT NULL COMMENT '客户名称',status
varchar(16) NOT NULL DEFAULT "10" COMMENT '运单状态',status_name
varchar(40) NOT NULL DEFAULT "" COMMENT '运单状态名',sku
varchar(150) NOT NULL DEFAULT "" COMMENT 'SKU',name
varchar(300) NOT NULL DEFAULT "" COMMENT '商品名称',name_en
varchar(300) NULL DEFAULT "" COMMENT '商品名称英文',cod
decimalv3(15, 2) NOT NULL DEFAULT "0.00" COMMENT '代收货款',billing_type
varchar(20) NOT NULL DEFAULT "" COMMENT '结算类型:0:经济,1:标准',unit_price
decimalv3(15, 2) NOT NULL DEFAULT "0.00" COMMENT '单价',quantity
int(11) NOT NULL DEFAULT "1" COMMENT '数量',goods_quantity
int(11) NOT NULL DEFAULT "0" COMMENT '运单揽收数量',sign_date
datetimev2(0) NULL COMMENT '签收时间',return_date
datetimev2(0) NULL COMMENT '退件时间',return_sign_date
datetimev2(0) NULL COMMENT '退件签收时间',enable_flag
tinyint(4) NOT NULL DEFAULT "0" COMMENT '0未删,1已删',data_source
int(11) NOT NULL DEFAULT "0" COMMENT '数据源',create_by
varchar(40) NOT NULL DEFAULT "System" COMMENT '创建人',create_time
datetimev2(0) NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',update_by
varchar(40) NOT NULL DEFAULT "System" COMMENT '更新人',update_time
datetimev2(0) NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间' ) ENGINE=OLAP UNIQUE KEY(good_id
,rec_date
) COMMENT 'OLAP' PARTITION BY RANGE(rec_date
) (PARTITION p202201 VALUES [('2022-01-01 00:00:00'), ('2022-02-01 00:00:00')), PARTITION p202202 VALUES [('2022-02-01 00:00:00'), ('2022-03-01 00:00:00')), PARTITION p202203 VALUES [('2022-03-01 00:00:00'), ('2022-04-01 00:00:00')), PARTITION p202204 VALUES [('2022-04-01 00:00:00'), ('2022-05-01 00:00:00')), PARTITION p202205 VALUES [('2022-05-01 00:00:00'), ('2022-06-01 00:00:00')), PARTITION p202206 VALUES [('2022-06-01 00:00:00'), ('2022-07-01 00:00:00')), PARTITION p202207 VALUES [('2022-07-01 00:00:00'), ('2022-08-01 00:00:00')), PARTITION p202208 VALUES [('2022-08-01 00:00:00'), ('2022-09-01 00:00:00')), PARTITION p202209 VALUES [('2022-09-01 00:00:00'), ('2022-10-01 00:00:00')), PARTITION p202210 VALUES [('2022-10-01 00:00:00'), ('2022-11-01 00:00:00')), PARTITION p202211 VALUES [('2022-11-01 00:00:00'), ('2022-12-01 00:00:00')), PARTITION p202212 VALUES [('2022-12-01 00:00:00'), ('2023-01-01 00:00:00')), PARTITION p202301 VALUES [('2023-01-01 00:00:00'), ('2023-02-01 00:00:00')), PARTITION p202302 VALUES [('2023-02-01 00:00:00'), ('2023-03-01 00:00:00')), PARTITION p202303 VALUES [('2023-03-01 00:00:00'), ('2023-04-01 00:00:00')), PARTITION p202304 VALUES [('2023-04-01 00:00:00'), ('2023-05-01 00:00:00'))) DISTRIBUTED BY HASH(good_id
,rec_date
) BUCKETS 4 PROPERTIES ( "replication_allocation" = "tag.location.default: 1", "dynamic_partition.enable" = "true", "dynamic_partition.time_unit" = "MONTH", "dynamic_partition.time_zone" = "Europe/London", "dynamic_partition.start" = "-2147483648", "dynamic_partition.end" = "2", "dynamic_partition.prefix" = "p", "dynamic_partition.replication_allocation" = "tag.location.default: 1", "dynamic_partition.buckets" = "8", "dynamic_partition.create_history_partition" = "false", "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_month" = "1", "in_memory" = "false", "storage_format" = "V2", "enable_unique_key_merge_on_write" = "true", "disable_auto_compaction" = "false" );What You Expected?
希望be的稳定性增强,并且日志提示明显一些。
How to Reproduce?
No response
Anything Else?
No response
Are you willing to submit PR?
Code of Conduct