Skip to content

Commit d1e9f7e

Browse files
authored
[fix](schema scan) Fix NPE for schema scan (#59389)
Introduced by #55334 java.lang.reflect.InvocationTargetException: null at jdk.internal.reflect.GeneratedMethodAccessor90.invoke(Unknown Source) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:569) ~[?:?] at org.apache.doris.service.FeServer.lambda$start$0(FeServer.java:60) ~[doris-fe.jar:1.2-SNAPSHOT] at jdk.proxy2.$Proxy47.describeTables(Unknown Source) ~[?:?] at org.apache.doris.thrift.FrontendService$Processor$describeTables.getResult(FrontendService.java:4122) ~[fe-common-1.2-SNAPSHOT.jar:1.2-SNAPSHOT] at org.apache.doris.thrift.FrontendService$Processor$describeTables.getResult(FrontendService.java:4102) ~[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:1136) ~[?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?] at java.lang.Thread.run(Thread.java:840) ~[?:?] Caused by: java.lang.NullPointerException: Cannot invoke "org.apache.doris.catalog.TableIf.isTemporary()" because "table" is null at org.apache.doris.service.FrontendServiceImpl.describeTables(FrontendServiceImpl.java:971) ~[doris-fe.jar:1.2-SNAPSHOT] ... 13 more 2025-12-25 20:00:07,417 ERROR (thrift-server-pool-5530|154) [ProcessFunction.process():47] Internal error processing describeTables java.lang.reflect.UndeclaredThrowableException: null at jdk.proxy2.$Proxy47.describeTables(Unknown Source) ~[?:?] at org.apache.doris.thrift.FrontendService$Processor$describeTables.getResult(FrontendService.java:4122) ~[fe-common-1.2-SNAPSHOT.jar:1.2-SNAPSHOT] at org.apache.doris.thrift.FrontendService$Processor$describeTables.getResult(FrontendService.java:4102) ~[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:1136) ~[?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?] at java.lang.Thread.run(Thread.java:840) ~[?:?] Caused by: java.lang.reflect.InvocationTargetException at jdk.internal.reflect.GeneratedMethodAccessor90.invoke(Unknown Source) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:569) ~[?:?] at org.apache.doris.service.FeServer.lambda$start$0(FeServer.java:60) ~[doris-fe.jar:1.2-SNAPSHOT] ... 9 more Caused by: java.lang.NullPointerException: Cannot invoke "org.apache.doris.catalog.TableIf.isTemporary()" because "table" is null at org.apache.doris.service.FrontendServiceImpl.describeTables(FrontendServiceImpl.java:971) ~[doris-fe.jar:1.2-SNAPSHOT] at jdk.internal.reflect.GeneratedMethodAccessor90.invoke(Unknown Source) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:569) ~[?:?] at org.apache.doris.service.FeServer.lambda$start$0(FeServer.java:60) ~[doris-fe.jar:1.2-SNAPSHOT] ... 9 more
1 parent cf57972 commit d1e9f7e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -895,13 +895,13 @@ public TDescribeTablesResult describeTables(TDescribeTablesParams params) throws
895895
if (db != null) {
896896
for (String tableName : tables) {
897897
TableIf table = db.getTableNullableIfException(tableName);
898-
if (table.isTemporary()) {
899-
// because we return all table names to be,
900-
// so when we skip temporary table, we should add a offset here
901-
tablesOffset.add(columns.size());
902-
continue;
903-
}
904898
if (table != null) {
899+
if (table.isTemporary()) {
900+
// because we return all table names to be,
901+
// so when we skip temporary table, we should add a offset here
902+
tablesOffset.add(columns.size());
903+
continue;
904+
}
905905
table.readLock();
906906
try {
907907
List<Column> baseSchema = table.getBaseSchemaOrEmpty();

0 commit comments

Comments
 (0)