branch-4.0: [fix](prune nested column) fix prune nested column maybe throw NullPointerException #60395#60444
Merged
yiguolei merged 1 commit intobranch-4.0from Feb 3, 2026
Merged
Conversation
…interException (#60395) fix prune nested column maybe throw NullPointerException, introduced by #58370 ```sql select k1 as k2 -- can not find s.k2, we should replace k2 to k1 from ( select struct_element(s, 'k1') k1 from tbl )t ``` ``` java.lang.NullPointerException: Cannot invoke "org.apache.doris.nereids.rules.rewrite.NestedColumnPruning$DataTypeAccessTree.setAccessByPath(java.util.List, int, org.apache.doris.thrift.TAccessPathType)" because the return value of "java.util.Map.get(Object)" is null at org.apache.doris.nereids.rules.rewrite.NestedColumnPruning$DataTypeAccessTree.setAccessByPath(NestedColumnPruning.java:431) at org.apache.doris.nereids.rules.rewrite.NestedColumnPruning.pruneDataType(NestedColumnPruning.java:128) at org.apache.doris.nereids.rules.rewrite.NestedColumnPruning.rewriteRoot(NestedColumnPruning.java:86) at org.apache.doris.nereids.jobs.rewrite.CustomRewriteJob.execute(CustomRewriteJob.java:61) at org.apache.doris.nereids.jobs.executor.AbstractBatchJobExecutor.execute(AbstractBatchJobExecutor.java:167) at org.apache.doris.nereids.jobs.executor.Rewriter.lambda$execute$23(Rewriter.java:963) at org.apache.doris.nereids.util.MoreFieldsThread.keepFunctionSignature(MoreFieldsThread.java:127) at org.apache.doris.nereids.util.MoreFieldsThread.keepFunctionSignature(MoreFieldsThread.java:116) at org.apache.doris.nereids.jobs.executor.Rewriter.execute(Rewriter.java:962) at org.apache.doris.nereids.NereidsPlanner.lambda$rewrite$5(NereidsPlanner.java:434) at org.apache.doris.nereids.NereidsPlanner.keepOrShowPlanProcess(NereidsPlanner.java:1109) at org.apache.doris.nereids.NereidsPlanner.rewrite(NereidsPlanner.java:433) at org.apache.doris.nereids.NereidsPlanner.planWithoutLock(NereidsPlanner.java:297) at org.apache.doris.nereids.NereidsPlanner.planWithLock(NereidsPlanner.java:263) at org.apache.doris.nereids.NereidsPlanner.plan(NereidsPlanner.java:162) at org.apache.doris.qe.StmtExecutor.executeByNereids(StmtExecutor.java:748) at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:541) at org.apache.doris.qe.StmtExecutor.queryRetry(StmtExecutor.java:500) at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:485) at org.apache.doris.qe.ConnectProcessor.executeQuery(ConnectProcessor.java:311) at org.apache.doris.qe.ConnectProcessor.handleQuery(ConnectProcessor.java:198) at org.apache.doris.qe.MysqlConnectProcessor.handleQuery(MysqlConnectProcessor.java:231) at org.apache.doris.qe.MysqlConnectProcessor.dispatch(MysqlConnectProcessor.java:259) at org.apache.doris.qe.MysqlConnectProcessor.processOnce(MysqlConnectProcessor.java:403) at org.apache.doris.mysql.ReadListener.lambda$handleEvent$0(ReadListener.java:52) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:840) ```
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
|
run buildall |
yiguolei
approved these changes
Feb 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-picked from #60395