matrixorigin / matrixone

Hyperconverged cloud-edge native database
https://docs.matrixorigin.cn/en
Apache License 2.0
1.79k stars 277 forks source link

[Bug]: [tpcds]ERROR 20101 (HY000): internal error: panic unreached code for query89 of tpcds #18161

Open aressu1985 opened 3 months ago

aressu1985 commented 3 months ago

Is there an existing issue for the same bug?

Branch Name

main

Commit ID

81eb633

Other Environment Information

- Hardware parameters: 64C 256G
- OS type:
- Others:

Actual Behavior

mysql> select -> from( -> select i_category, i_class, i_brand, -> s_store_name, s_company_name, -> d_moy, -> sum(ss_sales_price) sum_sales, -> avg(sum(ss_sales_price)) over -> (partition by i_category, i_brand, s_store_name, s_company_name) -> avg_monthly_sales -> from item, store_sales, date_dim, store -> where ss_item_sk = i_item_sk and -> ss_sold_date_sk = d_date_sk and -> ss_store_sk = s_store_sk and -> d_year in (2001) and -> ((i_category in ('Books','Children','Electronics') and -> i_class in ('history','school-uniforms','audio') -> ) -> or (i_category in ('Men','Sports','Shoes') and -> i_class in ('pants','tennis','womens') -> )) -> group by i_category, i_class, i_brand, -> s_store_name, s_company_name, d_moy) tmp1 -> where case when (avg_monthly_sales <> 0) then (abs(sum_sales - avg_monthly_sales) / avg_monthly_sales) else null end > 0.1 -> order by sum_sales - avg_monthly_sales, s_store_name -> limit 100; ERROR 20101 (HY000): internal error: panic unreached code: github.com/matrixorigin/matrixone/pkg/sql/plan/function.minusFn /data1/sudong/tpcds/matrixone/pkg/sql/plan/function/arithmetic.go:357 github.com/matrixorigin/matrixone/pkg/sql/colexec.(FunctionExpressionExecutor).Eval /data1/sudong/tpcds/matrixone/pkg/sql/colexec/evalExpression.go:607 github.com/matrixorigin/matrixone/pkg/sql/colexec.(*FunctionExpressionExecutor).Eval /data1/sudong/tpcds/matrixone/pkg/sql/colexec/evalExpression.go:574 github.com/matrixorigin/matri

SQL: select * from( select i_category, i_class, i_brand, s_store_name, s_company_name, d_moy, sum(ss_sales_price) sum_sales, avg(sum(ss_sales_price)) over (partition by i_category, i_brand, s_store_name, s_company_name) avg_monthly_sales from item, store_sales, date_dim, store where ss_item_sk = i_item_sk and ss_sold_date_sk = d_date_sk and ss_store_sk = s_store_sk and d_year in (2001) and ((i_category in ('Books','Children','Electronics') and i_class in ('history','school-uniforms','audio') ) or (i_category in ('Men','Sports','Shoes') and i_class in ('pants','tennis','womens') )) group by i_category, i_class, i_brand, s_store_name, s_company_name, d_moy) tmp1 where case when (avg_monthly_sales <> 0) then (abs(sum_sales - avg_monthly_sales) / avg_monthly_sales) else null end > 0.1 order by sum_sales - avg_monthly_sales, s_store_name limit 100;

mo-log: mo-service.log

Expected Behavior

No response

Steps to Reproduce

1、login to 129 srv
2、cd /data1/tpcds/matrixone, 启动MO
3、执行DDL,并LOAD 1G 数据,数据在/data1/tpcds/data/1G目录
4、执行queries

第3步可执行执行如下:
load data infile '/data1/sudong/tpcds/DSGen-software-code-3.2.0rc1/data/1/call_center.dat' into table tpcds.call_center  FIELDS TERMINATED BY '|' LINES TERMINATED BY '\n' parallel 'true';
load data infile '/data1/sudong/tpcds/DSGen-software-code-3.2.0rc1/data/1/catalog_page.dat' into table tpcds.catalog_page  FIELDS TERMINATED BY '|' LINES TERMINATED BY '\n' parallel 'true';
load data infile '/data1/sudong/tpcds/DSGen-software-code-3.2.0rc1/data/1/catalog_returns.dat' into table tpcds.catalog_returns  FIELDS TERMINATED BY '|' LINES TERMINATED BY '\n' parallel 'true';
load data infile '/data1/sudong/tpcds/DSGen-software-code-3.2.0rc1/data/1/catalog_sales.dat' into table tpcds.catalog_sales  FIELDS TERMINATED BY '|' LINES TERMINATED BY '\n' parallel 'true';
load data infile '/data1/sudong/tpcds/DSGen-software-code-3.2.0rc1/data/1/customer_address.dat' into table tpcds.customer_address  FIELDS TERMINATED BY '|' LINES TERMINATED BY '\n' parallel 'true';
load data infile '/data1/sudong/tpcds/DSGen-software-code-3.2.0rc1/data/1/customer.dat' into table tpcds.customer  FIELDS TERMINATED BY '|' LINES TERMINATED BY '\n' parallel 'true';
load data infile '/data1/sudong/tpcds/DSGen-software-code-3.2.0rc1/data/1/customer_demographics.dat' into table tpcds.customer_demographics  FIELDS TERMINATED BY '|' LINES TERMINATED BY '\n' parallel 'true';
load data infile '/data1/sudong/tpcds/DSGen-software-code-3.2.0rc1/data/1/date_dim.dat' into table tpcds.date_dim  FIELDS TERMINATED BY '|' LINES TERMINATED BY '\n' parallel 'true';
load data infile '/data1/sudong/tpcds/DSGen-software-code-3.2.0rc1/data/1/dbgen_version.dat' into table tpcds.dbgen_version  FIELDS TERMINATED BY '|' LINES TERMINATED BY '\n' parallel 'true';
load data infile '/data1/sudong/tpcds/DSGen-software-code-3.2.0rc1/data/1/household_demographics.dat' into table tpcds.household_demographics  FIELDS TERMINATED BY '|' LINES TERMINATED BY '\n' parallel 'true';
load data infile '/data1/sudong/tpcds/DSGen-software-code-3.2.0rc1/data/1/income_band.dat' into table tpcds.income_band  FIELDS TERMINATED BY '|' LINES TERMINATED BY '\n' parallel 'true';
load data infile '/data1/sudong/tpcds/DSGen-software-code-3.2.0rc1/data/1/inventory.dat' into table tpcds.inventory  FIELDS TERMINATED BY '|' LINES TERMINATED BY '\n' parallel 'true';
load data infile '/data1/sudong/tpcds/DSGen-software-code-3.2.0rc1/data/1/item.dat' into table tpcds.item  FIELDS TERMINATED BY '|' LINES TERMINATED BY '\n' parallel 'true';
load data infile '/data1/sudong/tpcds/DSGen-software-code-3.2.0rc1/data/1/promotion.dat' into table tpcds.promotion  FIELDS TERMINATED BY '|' LINES TERMINATED BY '\n' parallel 'true';
load data infile '/data1/sudong/tpcds/DSGen-software-code-3.2.0rc1/data/1/reason.dat' into table tpcds.reason  FIELDS TERMINATED BY '|' LINES TERMINATED BY '\n' parallel 'true';
load data infile '/data1/sudong/tpcds/DSGen-software-code-3.2.0rc1/data/1/ship_mode.dat' into table tpcds.ship_mode  FIELDS TERMINATED BY '|' LINES TERMINATED BY '\n' parallel 'true';
load data infile '/data1/sudong/tpcds/DSGen-software-code-3.2.0rc1/data/1/store.dat' into table tpcds.store  FIELDS TERMINATED BY '|' LINES TERMINATED BY '\n' parallel 'true';
load data infile '/data1/sudong/tpcds/DSGen-software-code-3.2.0rc1/data/1/store_returns.dat' into table tpcds.store_returns  FIELDS TERMINATED BY '|' LINES TERMINATED BY '\n' parallel 'true';
load data infile '/data1/sudong/tpcds/DSGen-software-code-3.2.0rc1/data/1/store_sales.dat' into table tpcds.store_sales  FIELDS TERMINATED BY '|' LINES TERMINATED BY '\n' parallel 'true';
load data infile '/data1/sudong/tpcds/DSGen-software-code-3.2.0rc1/data/1/time_dim.dat' into table tpcds.time_dim  FIELDS TERMINATED BY '|' LINES TERMINATED BY '\n' parallel 'true';
load data infile '/data1/sudong/tpcds/DSGen-software-code-3.2.0rc1/data/1/warehouse.dat' into table tpcds.warehouse  FIELDS TERMINATED BY '|' LINES TERMINATED BY '\n' parallel 'true';
load data infile '/data1/sudong/tpcds/DSGen-software-code-3.2.0rc1/data/1/web_page.dat' into table tpcds.web_page  FIELDS TERMINATED BY '|' LINES TERMINATED BY '\n' parallel 'true';
load data infile '/data1/sudong/tpcds/DSGen-software-code-3.2.0rc1/data/1/web_returns.dat' into table tpcds.web_returns  FIELDS TERMINATED BY '|' LINES TERMINATED BY '\n' parallel 'true';
load data infile '/data1/sudong/tpcds/DSGen-software-code-3.2.0rc1/data/1/web_sales.dat' into table tpcds.web_sales  FIELDS TERMINATED BY '|' LINES TERMINATED BY '\n' parallel 'true';
load data infile '/data1/sudong/tpcds/DSGen-software-code-3.2.0rc1/data/1/web_site.dat' into table tpcds.web_site  FIELDS TERMINATED BY '|' LINES TERMINATED BY '\n' parallel 'true';

Additional information

No response

ouyuanning commented 3 months ago

减号函数碰到了不支持的数据类型