Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fix](tvf) fix azure tvf: can not build s3() (apache#45872)
### What problem does this PR solve? Issue Number: DORIS-17644 Related PR: apache#37240 Problem Summary: `properties` is an immutable map, trying to modify it will cause `UnsupportedOperationException` to be thrown. ``` 2024-12-24 18:01:22,287 WARN (mysql-nio-pool-0|490) [StmtExecutor.executeByNereids():836] Nereids plan query failed: SELECT * FROM S3 ( ... ) org.apache.doris.nereids.exceptions.AnalysisException: Can not build s3(): null at org.apache.doris.nereids.trees.expressions.functions.table.S3.toCatalogFunction(S3.java:55) ~[doris-fe.jar:1.2-SNAPSHOT] at com.google.common.base.Suppliers$NonSerializableMemoizingSupplier.get(Suppliers.java:186) ~[guava-33.2.1-jre.jar:?] at org.apache.doris.nereids.trees.expressions.functions.table.TableValuedFunction.lambda$new$0(TableValuedFunction.java:55) ~[doris-fe.jar:1.2-SNAPSHOT] at com.google.common.base.Suppliers$NonSerializableMemoizingSupplier.get(Suppliers.java:186) ~[guava-33.2.1-jre.jar:?] at org.apache.doris.nereids.trees.expressions.functions.table.TableValuedFunction.getTable(TableValuedFunction.java:103) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.nereids.trees.plans.logical.LogicalTVFRelation.computeOutput(LogicalTVFRelation.java:105) ~[doris-fe.jar:1.2-SNAPSHOT] at com.google.common.base.Suppliers$NonSerializableMemoizingSupplier.get(Suppliers.java:186) ~[guava-33.2.1-jre.jar:?] at org.apache.doris.nereids.properties.LogicalProperties.getOutput(LogicalProperties.java:104) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.nereids.trees.plans.AbstractPlan.getOutput(AbstractPlan.java:169) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.nereids.util.PlanUtils.fastGetChildrenOutputs(PlanUtils.java:161) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.nereids.rules.analysis.BindExpression.buildSimpleExprAnalyzer(BindExpression.java:1241) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.nereids.rules.analysis.BindExpression.bindProject(BindExpression.java:626) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.nereids.pattern.PatternMatcher$1.transform(PatternMatcher.java:92) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.nereids.rules.AppliedAwareRule.transform(AppliedAwareRule.java:55) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.nereids.jobs.rewrite.PlanTreeRewriteJob.rewrite(PlanTreeRewriteJob.java:57) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.nereids.jobs.rewrite.PlanTreeRewriteBottomUpJob.rewriteThis(PlanTreeRewriteBottomUpJob.java:91) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.nereids.jobs.rewrite.PlanTreeRewriteBottomUpJob.execute(PlanTreeRewriteBottomUpJob.java:75) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.nereids.jobs.scheduler.SimpleJobScheduler.executeJobPool(SimpleJobScheduler.java:44) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.nereids.jobs.rewrite.RootPlanTreeRewriteJob.execute(RootPlanTreeRewriteJob.java:66) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.nereids.jobs.executor.AbstractBatchJobExecutor.execute(AbstractBatchJobExecutor.java:139) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.nereids.jobs.executor.Analyzer.analyze(Analyzer.java:87) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.nereids.NereidsPlanner.lambda$analyze$4(NereidsPlanner.java:361) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.nereids.NereidsPlanner.keepOrShowPlanProcess(NereidsPlanner.java:888) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.nereids.NereidsPlanner.analyze(NereidsPlanner.java:361) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.nereids.NereidsPlanner.planWithoutLock(NereidsPlanner.java:250) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.nereids.NereidsPlanner.planWithLock(NereidsPlanner.java:224) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.nereids.NereidsPlanner.plan(NereidsPlanner.java:145) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.qe.StmtExecutor.executeByNereids(StmtExecutor.java:830) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:609) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.qe.StmtExecutor.queryRetry(StmtExecutor.java:572) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:562) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.qe.ConnectProcessor.executeQuery(ConnectProcessor.java:347) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.qe.ConnectProcessor.handleQuery(ConnectProcessor.java:250) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.qe.MysqlConnectProcessor.handleQuery(MysqlConnectProcessor.java:209) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.qe.MysqlConnectProcessor.dispatch(MysqlConnectProcessor.java:237) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.qe.MysqlConnectProcessor.processOnce(MysqlConnectProcessor.java:417) ~[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: java.lang.UnsupportedOperationException at com.google.common.collect.ImmutableMap.put(ImmutableMap.java:814) ~[guava-33.2.1-jre.jar:?] at org.apache.doris.tablefunction.S3TableValuedFunction.<init>(S3TableValuedFunction.java:66) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.nereids.trees.expressions.functions.table.S3.toCatalogFunction(S3.java:53) ~[doris-fe.jar:1.2-SNAPSHOT] ... 39 more ```
- Loading branch information