Repository navigation
Description
直接查询
SELECT yjsj FROM es_.default_db.theme_jzxxb LIMIT 10;
可以正常得到结果 比如:2024-11-04 18:46:40
执行cte查询报错
WITH node_xxx AS (
SELECT
yjsj
FROM es_.default_db.theme_jzxxb
)
SELECT * FROM node_xxx LIMIT 10;
错误日志:
org.jkiss.dbeaver.model.sql.DBSQLException: SQL 错误 [1105] [HY000]: errCode = 2, detailMessage = Input slot(s) not in child's output: yjsj#18 in plan: LogicalProject[63] ( distinct=false, projects=[yjsj#18 AS yjsj#9] )
child output is: [address#19, content#20, fssj#21, groupName#22, mtype#23, rawContent#24, tzzhm#25, tzzlx#26, yjsj#27]
plan tree:
LogicalProject[63] ( distinct=false, projects=[yjsj#18 AS yjsj#9] )
+--LogicalEsScan ( qualified=es_.default_db.theme_jzxxb, output=[address#19, content#20, fssj#21, groupName#22, mtype#23, rawContent#24, tzzhm#25, tzzlx#26, yjsj#27] )
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.executeStatement(JDBCStatementImpl.java:130)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.executeStatement(SQLQueryJob.java:657)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.lambda$2(SQLQueryJob.java:550)
at org.jkiss.dbeaver.model.exec.DBExecUtils.tryExecuteRecover(DBExecUtils.java:189)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.executeSingleQuery(SQLQueryJob.java:569)
at org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.extractData(SQLQueryJob.java:1043)
at org.jkiss.dbeaver.ui.editors.sql.SQLEditor$QueryResultsContainer.readData(SQLEditor.java:4326)
at org.jkiss.dbeaver.ui.controls.resultset.ResultSetJobDataRead.lambda$0(ResultSetJobDataRead.java:128)
at org.jkiss.dbeaver.model.exec.DBExecUtils.tryExecuteRecover(DBExecUtils.java:189)
at org.jkiss.dbeaver.ui.controls.resultset.ResultSetJobDataRead.run(ResultSetJobDataRead.java:126)
at org.jkiss.dbeaver.ui.controls.resultset.ResultSetViewer$ResultSetDataPumpJob.run(ResultSetViewer.java:5112)
at org.jkiss.dbeaver.model.runtime.AbstractJob.run(AbstractJob.java:119)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.sql.SQLException: errCode = 2, detailMessage = Input slot(s) not in child's output: yjsj#18 in plan: LogicalProject[63] ( distinct=false, projects=[yjsj#18 AS yjsj#9] )
child output is: [address#19, content#20, fssj#21, groupName#22, mtype#23, rawContent#24, tzzhm#25, tzzlx#26, yjsj#27]
plan tree:
LogicalProject[63] ( distinct=false, projects=[yjsj#18 AS yjsj#9] )
+--LogicalEsScan ( qualified=es_.default_db.theme_jzxxb, output=[address#19, content#20, fssj#21, groupName#22, mtype#23, rawContent#24, tzzhm#25, tzzlx#26, yjsj#27] )
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:130)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:767)
at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:652)
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.execute(JDBCStatementImpl.java:344)
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.executeStatement(JDBCStatementImpl.java:128)
... 12 more
Activity
zclllyybb commentedon May 28, 2026
Breakwater-GitHub-Analysis-Slot: slot_e48c70cda997
Initial analysis:
This looks like a Doris FE/Nereids planner consistency bug, not a DBeaver issue and not an Elasticsearch data-read failure. The important part of the error is:
So the column name exists in the ES scan output, but the
LogicalProjectabove the scan is still holding an olderExprId. That means the query fails during FE plan validation before it reaches BE/ES execution.The pattern is consistent with CTE inline/deep-copy remapping of a catalog relation: the CTE body projects one ES column, then the copied scan has regenerated output slots, but the upper project is not aligned with the copied child output. In the current upstream master, this exact
LogicalEsScanpath has already been removed/refactored by the ES catalog plugin-driven migration, so the report needs the exact Doris version/branch to confirm whether it is on an older ES scan path. On branch-4.0, there is also a very recent related fix,Preserve operative slots when deep copying logical relations(#63315, backported as #63708), which fixes incorrect remapping when the operative column is not in the first output position. In this caseyjsjis the last column in the reported scan output, so that fix is highly relevant.Suggested next steps:
LogicalEsScanclass shown in the error.fssj:This issue is currently filed in
apache/doris-website, but the symptom is a Doris planner/runtime issue. It should probably be transferred or recreated inapache/dorisonce the version information is available.morningman commentedon Nov 12, 2026
This report is now tracked in the Apache Doris engine repository: apache/doris#70529
The engine issue preserves the original request/reproduction details and the information still needed for diagnosis. Closing this website issue so further implementation or investigation can continue there. This is a tracking move, not a claim that the feature or failure is already fixed.