apache / doris

Apache Doris is an easy-to-use, high performance and unified analytics database.
https://doris.apache.org
Apache License 2.0
11.84k stars 3.12k forks source link

[Bug] When I insert the query results of a virtual table into another table using Insert Into, I get an error: java.lang.NullPointerException: null #29934

Open SoWhat-ET opened 5 months ago

SoWhat-ET commented 5 months ago

Search before asking

Version

V2.0.2

What's Wrong?

drop table if exists dim.dim; create table if not exists dim.dim ( date_value datetime comment 'date' ) distributed by hash(date_value) buckets 3;

insert into dim.dim select adddate('2000-01-01', number) date_value from numbers('number' = '18263')

image

2024-01-13 17:10:19,121 WARN (thrift-server-pool-158|550181) [StmtExecutor.analyze():992] Analyze failed. stmt[39802, 9a5e39b6665b4a8f-baec09055dd970a1] java.lang.NullPointerException: null at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936) ~[?:1.8.0_352] at org.apache.doris.datasource.CatalogMgr.getCatalogOrException(CatalogMgr.java:181) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.datasource.CatalogMgr.getCatalogOrAnalysisException(CatalogMgr.java:189) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.analysis.StmtRewriter.rewriteByPolicy(StmtRewriter.java:1320) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.qe.StmtExecutor.analyzeAndGenerateQueryPlan(StmtExecutor.java:1100) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.qe.StmtExecutor.analyze(StmtExecutor.java:975) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.qe.StmtExecutor.executeByLegacy(StmtExecutor.java:673) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:448) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.qe.ConnectProcessor.proxyExecute(ConnectProcessor.java:775) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.service.FrontendServiceImpl.forward(FrontendServiceImpl.java:1031) ~[doris-fe.jar:1.2-SNAPSHOT] at sun.reflect.GeneratedMethodAccessor22.invoke(Unknown Source) ~[?:?] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_352] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_352] at org.apache.doris.service.FeServer.lambda$start$0(FeServer.java:59) ~[doris-fe.jar:1.2-SNAPSHOT] at com.sun.proxy.$Proxy25.forward(Unknown Source) ~[?:?] at org.apache.doris.thrift.FrontendService$Processor$forward.getResult(FrontendService.java:2892) ~[fe-common-1.2-SNAPSHOT.jar:1.2-SNAPSHOT] at org.apache.doris.thrift.FrontendService$Processor$forward.getResult(FrontendService.java:2872) ~[fe-common-1.2-SNAPSHOT.jar:1.2-SNAPSHOT] at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:38) ~[libthrift-0.16.0.jar:0.16.0] at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:38) ~[libthrift-0.16.0.jar:0.16.0] at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:250) ~[libthrift-0.16.0.jar:0.16.0] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_352] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_352] at java.lang.Thread.run(Thread.java:750) ~[?:1.8.0_352] 2024-01-13 17:10:19,123 WARN (thrift-server-pool-158|550181) [StmtExecutor.executeByLegacy():776] execute Exception. stmt[39802, 9a5e39b6665b4a8f-baec09055dd970a1] org.apache.doris.common.AnalysisException: errCode = 2, detailMessage = Unexpected exception: null at org.apache.doris.qe.StmtExecutor.analyze(StmtExecutor.java:993) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.qe.StmtExecutor.executeByLegacy(StmtExecutor.java:673) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.qe.StmtExecutor.execute(StmtExecutor.java:448) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.qe.ConnectProcessor.proxyExecute(ConnectProcessor.java:775) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.service.FrontendServiceImpl.forward(FrontendServiceImpl.java:1031) ~[doris-fe.jar:1.2-SNAPSHOT] at sun.reflect.GeneratedMethodAccessor22.invoke(Unknown Source) ~[?:?] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_352] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_352] at org.apache.doris.service.FeServer.lambda$start$0(FeServer.java:59) ~[doris-fe.jar:1.2-SNAPSHOT] at com.sun.proxy.$Proxy25.forward(Unknown Source) ~[?:?] at org.apache.doris.thrift.FrontendService$Processor$forward.getResult(FrontendService.java:2892) ~[fe-common-1.2-SNAPSHOT.jar:1.2-SNAPSHOT] at org.apache.doris.thrift.FrontendService$Processor$forward.getResult(FrontendService.java:2872) ~[fe-common-1.2-SNAPSHOT.jar:1.2-SNAPSHOT] at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:38) ~[libthrift-0.16.0.jar:0.16.0] at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:38) ~[libthrift-0.16.0.jar:0.16.0] at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:250) ~[libthrift-0.16.0.jar:0.16.0] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_352] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_352] at java.lang.Thread.run(Thread.java:750) ~[?:1.8.0_352]

What You Expected?

insert success

How to Reproduce?

No response

Anything Else?

No response

Are you willing to submit PR?

Code of Conduct

CalvinKirs commented 5 months ago

Could you give me some details infos? I performed this operation but no error occurred. In addition, can you execute show frontends to provide specific information about the version?