为了更快的定位您的问题,请提供以下信息,谢谢
【详述】Starrocks执行以下sql报错:ERROR 1064 (HY000): Unknown error
SELECT a.group_id,
MAX(a.inaj022) as last_txn_date
FROM (
SELECT tb.group_id,
tb.comp_id,
tb.dblink_id,
ifnull(a.inajsite,‘NULL’) as inajsite,
ifnull(a.inaj005,‘NULL’) as inaj005,
ifnull(a.inaj006,’ ‘) as inaj006,
ifnull(a.inaj007,‘NULL’) as inaj007,
ifnull(a.inaj008,‘NULL’) as inaj008,
ifnull(a.inaj009,‘NULL’) as inaj009,
ifnull(a.inaj010,’ ') as inaj010,
ifnull(a.inaj004,0) as inaj004,
a.inaj022,
a.inajent,
b.ooef017,
c.ooef004,
CASE WHEN f1.ooaa002=‘1’
THEN SUBSTR(a.inaj001,f2.ooaa002 + CASE WHEN f3.ooaa002=‘Y’ THEN 1 ELSE 0 END + 1,f4.ooaa002)
ELSE SUBSTR(a.inaj001,1,f4.ooaa002)
END as pre_col,
tb.source_ent_code
FROM standard_model.stage_all_group_comp_dblink tb
join standard_model.inaj_t a on(tb.source_ent_code=a.inajent)
INNER JOIN standard_model.ooef_t b on a.inajent=b.ooefent and a.inajsite=b.ooef001 and tb.source_comp_code=b.ooef017
INNER JOIN standard_model.ooef_t c on a.inajent=c.ooefent and b.ooef017=c.ooef001
INNER JOIN standard_model.ooaa_t f1 on f1.ooaaent=a.inajent and f1.ooaa001=‘E-COM-0008’
INNER JOIN standard_model.ooaa_t f2 on f2.ooaaent=a.inajent and f2.ooaa001=‘E-COM-0003’
INNER JOIN standard_model.ooaa_t f3 on f3.ooaaent=a.inajent and f3.ooaa001=‘E-COM-0002’
INNER JOIN standard_model.ooaa_t f4 on f4.ooaaent=a.inajent and f4.ooaa001=‘E-COM-0001’
) a
JOIN standard_model.ooba_t d on d.oobaent=a.source_ent_code
and d.ooba001=a.ooef004
and d.ooba002=a.pre_col
GROUP BY a.group_id
limit 10
;
fe.warn.log存在以下异常日志:
java.util.NoSuchElementException
at java.base/java.util.ArrayList$Itr.next(ArrayList.java:1000)
at com.google.common.collect.Ordering.min(Ordering.java:568)
at com.google.common.collect.Ordering.min(Ordering.java:593)
at com.starrocks.sql.optimizer.rule.join.JoinReorderDP.getBestExpr(JoinReorderDP.java:101)
at com.starrocks.sql.optimizer.rule.join.JoinReorderDP.enumerate(JoinReorderDP.java:48)
at com.starrocks.sql.optimizer.rule.join.JoinOrder.reorder(JoinOrder.java:231)
at com.starrocks.sql.optimizer.rule.join.ReorderJoinRule.enumerate(ReorderJoinRule.java:95)
at com.starrocks.sql.optimizer.rule.join.ReorderJoinRule.transform(ReorderJoinRule.java:234)
at com.starrocks.sql.optimizer.Optimizer.memoOptimize(Optimizer.java:815)
at com.starrocks.sql.optimizer.Optimizer.optimizeByCost(Optimizer.java:265)
at com.starrocks.sql.optimizer.Optimizer.optimize(Optimizer.java:189)
at com.starrocks.sql.StatementPlanner.createQueryPlanWithReTry(StatementPlanner.java:318)
at com.starrocks.sql.StatementPlanner.plan(StatementPlanner.java:133)
at com.starrocks.sql.StatementPlanner.plan(StatementPlanner.java:92)
at com.starrocks.qe.StmtExecutor.execute(StmtExecutor.java:548)
at com.starrocks.qe.ConnectProcessor.handleQuery(ConnectProcessor.java:353)
at com.starrocks.qe.ConnectProcessor.dispatch(ConnectProcessor.java:548)
at com.starrocks.qe.ConnectProcessor.processOnce(ConnectProcessor.java:882)
at com.starrocks.mysql.nio.ReadListener.lambda$handleEvent$0(ReadListener.java:69)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
【背景】做过哪些操作?
重启Starrcoks后,只有第一次可以正常执行,后续问题必现
【业务影响】sql无法执行,starrocks不可用
【是否存算分离】否
【StarRocks版本】例如:3.3.3
【集群规模】例如:1fe +3 be(fe与be单独部署)
【机器信息】CPU虚拟核/内存/网卡,例如:16C/64G/万兆
【联系方式】StarRocks社区群17 - Golden
【附件】
- fe.log/beINFO/相应截图