apache / apache/doris

[Bug] MaterializationSinkOperatorX failed to find rpc_struct

Open
#63,526 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
Java
Stars
15.9k
Forks
3.9k
Avg merge
2d 23h
Merged PRs (30d)
522

Description

### Search before asking

- [x] I had searched in the [issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no similar issues.

### Version

4.0.4

建立的 doris catalog 是 4.0.3 版本

### What's Wrong?

sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (1105, 'errCode = 2, detailMessage = ()[INTERNAL_ERROR]MaterializationSinkOperatorX failed to find rpc_struct, backend_id=13389')

[SQL: WITH logical_rows AS (SELECT `statistic_period` AS `statistic_period`,`region` AS `region`,`score_system` AS `score_system`,`indicator_name` AS `indicator_name`,`indicator_value` AS `indicator_value`,0 AS `__query_deleted` FROM `foil_external_doris_catalog_1457647042849792`.`test_foil`.`bj_finance_statistic_data`) SELECT `statistic_period`,`region`,`score_system`,`indicator_name`,`indicator_value` FROM logical_rows WHERE `__query_deleted` = 0 ORDER BY `indicator_name` ASC LIMIT %s OFFSET %s]

[parameters: (10, 0)]

### What You Expected?

正常查询 不报错

### How to Reproduce?

构建了一个 doris catalog

WITH logical_rows AS (SELECT `statistic_period` AS `statistic_period`,
`region` AS `region`,
`score_system` AS `score_system`,
`indicator_name` AS `indicator_name`,
`indicator_value` AS `indicator_value`,
0 AS `__query_deleted`
FROM `foil_external_doris_catalog_1457647042849792`.`test_foil`.`bj_finance_statistic_data`)
SELECT `statistic_period`, `region`, `score_system`, `indicator_name`, `indicator_value`
FROM logical_rows
WHERE `__query_deleted` = 0
ORDER BY `indicator_name` ASC;

去掉 order by 后可以查询成功

### Anything Else?

_No response_

### Are you willing to submit PR?

- [ ] Yes I am willing to submit a PR!

### Code of Conduct

- [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)

Contributor guide

Open the contributing guide

Research direction

Start by running the reported SQL against a Doris 4.0.4 catalog backed by the 4.0.3 catalog setup, then compare it with the same query without ORDER BY. Investigate the MaterializationSinkOperatorX failure and rpc_struct error shown in the report. Done means the ordered query completes successfully without the reported INTERNAL_ERROR.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, sql
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.