apache / doris

Apache Doris is an easy-to-use, high performance and unified analytics database.
https://doris.apache.org
Apache License 2.0
11.84k stars 3.12k forks source link

[Bug] Doris 2.1.3 tpc-ds test query14.sql,query,query58.sql execute fail #36645

Open badrecover opened 2 weeks ago

badrecover commented 2 weeks ago

Search before asking

Version

Doris 2.1.3 /OpenJDK Runtime Environment (Red_Hat-17.0.11.0.9-3) (build 17.0.11+9-LTS) Rocky Linux release 9.2 (Blue Onyx)

What's Wrong?

exec query14.sql in DBeaver,than report follow:

SQL 错误 [1105] [HY000]: errCode = 2, detailMessage = (1.1.1.74)[CANCELLED]Expected EQ 1 to be returned by expression  (SCALARSUBQUERY) SubqueryExpr ( QueryPlan=LogicalProject[328] ( distinct=false, projects=[d_week_seq#610], excepts=[] ), CorrelatedSlots=[], typeCoercionExpr=null )

fe.log

What You Expected?

Please Fix bugs

How to Reproduce?

No response

Anything Else?

No response

Are you willing to submit PR?

Code of Conduct

badrecover commented 1 week ago

query14.sql 中包含了两个查询,前一个查询是正常的,后一个查询的语句有问题,删除后一个查询即可; query14.sql的第二个查询及query58.sql中,的失败均因date_dim表的子查询返回了多条记录,加上limit 1即可; mysql> select d_week_seq -> from date_dim -> where d_year = 1999 + 1 -> and d_moy = 12 -> and d_dom = 3; +------------+ | d_week_seq | +------------+ | 5266 | | 5266 | +------------+ 2 rows in set (0.02 sec)

mysql>

(select 'store' channel, i_brand_id,i_class_id,i_category_id, sum(ss_quantityss_list_price) sales, count() number_sales from store_sales ,item ,date_dim where ss_item_sk in (select ss_item_sk from cross_items) and ss_item_sk = i_item_sk and ss_sold_date_sk = d_date_sk and d_week_seq = (select d_week_seq from date_dim where d_year = 1999 + 1 and d_moy = 12 and d_dom = 3 limit 1) group by i_brand_id,i_class_id,i_category_id having sum(ss_quantity*ss_list_price) > (select average_sales from avg_sales)) this_year