Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix](explain) fix NPE when explain verbose with partition batch mode (#40969) #41231

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

morningman
Copy link
Contributor

bp #40969

…apache#40969)

If trigger "fetching partition in batch mode" feature, the `explain
verbose` for external table may cause NPE.
Because in batch mode, the scan range is not initialized in plan phase.

```
org.apache.doris.common.NereidsException: errCode = 2, detailMessage = java.lang.NullPointerException
        at org.apache.doris.qe.StmtExecutor.executeByNereids(StmtExecutor.java:767) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:591) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.qe.StmtExecutor.queryRetry(StmtExecutor.java:554) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:544) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.qe.ConnectProcessor.executeQuery(ConnectProcessor.java:323) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.qe.ConnectProcessor.handleQuery(ConnectProcessor.java:234) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.qe.MysqlConnectProcessor.handleQuery(MysqlConnectProcessor.java:194) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.qe.MysqlConnectProcessor.dispatch(MysqlConnectProcessor.java:222) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.qe.MysqlConnectProcessor.processOnce(MysqlConnectProcessor.java:281) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.mysql.ReadListener.lambda$handleEvent$0(ReadListener.java:52) ~[doris-fe.jar:1.2-SNAPSHOT]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: org.apache.doris.common.AnalysisException: errCode = 2, detailMessage = java.lang.NullPointerException
        ... 13 more
Caused by: java.lang.NullPointerException
        at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:903) ~[guava-32.1.2-jre.jar:?]
        at com.google.common.collect.AbstractMultimap.putAll(AbstractMultimap.java:83) ~[guava-32.1.2-jre.jar:?]
        at com.google.common.collect.ArrayListMultimap.putAll(ArrayListMultimap.java:62) ~[guava-32.1.2-jre.jar:?]
        at org.apache.doris.datasource.FileScanNode.getNodeExplainString(FileScanNode.java:141) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.planner.PlanNode.getExplainString(PlanNode.java:548) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.planner.PlanFragment.getExplainString(PlanFragment.java:369) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.planner.Planner.getExplainString(Planner.java:93) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.nereids.NereidsPlanner.getExplainString(NereidsPlanner.java:627) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.nereids.trees.plans.commands.ExplainCommand.run(ExplainCommand.java:96) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.qe.StmtExecutor.executeByNereids(StmtExecutor.java:736) ~[doris-fe.jar:1.2-SNAPSHOT]
        ... 12 more
```
@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@morningman
Copy link
Contributor Author

run buildall

@morningman morningman merged commit fc0b4b9 into apache:branch-2.1 Sep 24, 2024
21 of 22 checks passed
@yiguolei yiguolei mentioned this pull request Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants