matrixorigin / matrixone

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

[Bug]: [tpcds]ERROR 20101 (HY000): internal error: unexpected input batch for column expression for query49 of tpcds #18153

Open aressu1985 opened 2 months ago

aressu1985 commented 2 months ago

Is there an existing issue for the same bug?

Branch Name

main

Commit ID

81eb633e5f489f172e0fd9e434a437e99e82c40c

Other Environment Information

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

Actual Behavior

SQL: select channel, item, return_ratio, return_rank, currency_rank from (select 'web' as channel ,web.item ,web.return_ratio ,web.return_rank ,web.currency_rank from ( select item ,return_ratio ,currency_ratio ,rank() over (order by return_ratio) as return_rank ,rank() over (order by currency_ratio) as currency_rank from ( select ws.ws_item_sk as item ,(cast(sum(coalesce(wr.wr_return_quantity,0)) as decimal(15,4))/ cast(sum(coalesce(ws.ws_quantity,0)) as decimal(15,4) )) as return_ratio ,(cast(sum(coalesce(wr.wr_return_amt,0)) as decimal(15,4))/ cast(sum(coalesce(ws.ws_net_paid,0)) as decimal(15,4) )) as currency_ratio from web_sales ws left outer join web_returns wr on (ws.ws_order_number = wr.wr_order_number and ws.ws_item_sk = wr.wr_item_sk) ,date_dim where wr.wr_return_amt > 10000 and ws.ws_net_profit > 1 and ws.ws_net_paid > 0 and ws.ws_quantity > 0 and ws_sold_date_sk = d_date_sk and d_year = 1998 and d_moy = 11 group by ws.ws_item_sk ) in_web ) web where ( web.return_rank <= 10 or web.currency_rank <= 10 ) union select 'catalog' as channel ,catalog.item ,catalog.return_ratio ,catalog.return_rank ,catalog.currency_rank from ( select item ,return_ratio ,currency_ratio ,rank() over (order by return_ratio) as return_rank ,rank() over (order by currency_ratio) as currency_rank from ( select cs.cs_item_sk as item ,(cast(sum(coalesce(cr.cr_return_quantity,0)) as decimal(15,4))/ cast(sum(coalesce(cs.cs_quantity,0)) as decimal(15,4) )) as return_ratio ,(cast(sum(coalesce(cr.cr_return_amount,0)) as decimal(15,4))/ cast(sum(coalesce(cs.cs_net_paid,0)) as decimal(15,4) )) as currency_ratio from catalog_sales cs left outer join catalog_returns cr on (cs.cs_order_number = cr.cr_order_number and cs.cs_item_sk = cr.cr_item_sk) ,date_dim where cr.cr_return_amount > 10000 and cs.cs_net_profit > 1 and cs.cs_net_paid > 0 and cs.cs_quantity > 0 and cs_sold_date_sk = d_date_sk and d_year = 1998 and d_moy = 11 group by cs.cs_item_sk ) in_cat ) catalog where ( catalog.return_rank <= 10 or catalog.currency_rank <=10 ) union select 'store' as channel ,store.item ,store.return_ratio ,store.return_rank ,store.currency_rank from ( select item ,return_ratio ,currency_ratio ,rank() over (order by return_ratio) as return_rank ,rank() over (order by currency_ratio) as currency_rank from ( select sts.ss_item_sk as item ,(cast(sum(coalesce(sr.sr_return_quantity,0)) as decimal(15,4))/cast(sum(coalesce(sts.ss_quantity,0)) as decimal(15,4) )) as return_ratio ,(cast(sum(coalesce(sr.sr_return_amt,0)) as decimal(15,4))/cast(sum(coalesce(sts.ss_net_paid,0)) as decimal(15,4) )) as currency_ratio from store_sales sts left outer join store_returns sr on (sts.ss_ticket_number = sr.sr_ticket_number and sts.ss_item_sk = sr.sr_item_sk) ,date_dim where sr.sr_return_amt > 10000 and sts.ss_net_profit > 1 and sts.ss_net_paid > 0 and sts.ss_quantity > 0 and ss_sold_date_sk = d_date_sk and d_year = 1998 and d_moy = 11 group by sts.ss_item_sk ) in_store ) store where ( store.return_rank <= 10 or store.currency_rank <= 10 ) ) order by 1,4,5,2 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

jensenojs commented 2 months ago

先处理 #18157

https://github.com/matrixorigin/matrixone/issues/18157#issuecomment-2298350024

jensenojs commented 2 months ago

not working on it

jensenojs commented 2 months ago

may duplicate with

相关的ddl https://github.com/matrixorigin/matrixone/issues/18157#issuecomment-2295776371

复现这个问题应该是不需要真的把数据给导入进去, 创建了ddl之后往表里面随便插一行数据确保不为空就可以出来了

iamlinjunhong commented 2 months ago

暂未处理

iamlinjunhong commented 2 months ago

暂未处理

iamlinjunhong commented 2 months ago

暂未处理

iamlinjunhong commented 1 month ago

暂未处理

iamlinjunhong commented 1 month ago

暂未处理

iamlinjunhong commented 1 month ago

暂未处理

iamlinjunhong commented 1 month ago

暂未处理

iamlinjunhong commented 1 month ago

暂未处理

iamlinjunhong commented 1 month ago

暂未处理

iamlinjunhong commented 3 weeks ago

暂未处理

iamlinjunhong commented 3 weeks ago

暂未处理

iamlinjunhong commented 2 weeks ago

暂未处理

iamlinjunhong commented 1 week ago

暂未处理

iamlinjunhong commented 1 week ago

暂未处理

iamlinjunhong commented 4 days ago

暂未处理