This is an automated email from the ASF dual-hosted git repository.

starocean999 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 41aeb12ffcc [fix](nereids)fix tableNameInfo is null in tableRefInfo 
(#56219)
41aeb12ffcc is described below

commit 41aeb12ffccdf7bff764c4cb2a10f20677b48499
Author: yaoxiao <[email protected]>
AuthorDate: Mon Sep 22 15:07:33 2025 +0800

    [fix](nereids)fix tableNameInfo is null in tableRefInfo (#56219)
---
 .../apache/doris/nereids/trees/plans/commands/info/TableRefInfo.java  | 4 +++-
 .../src/main/java/org/apache/doris/service/FrontendServiceImpl.java   | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/info/TableRefInfo.java
 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/info/TableRefInfo.java
index 17da10b8d59..d8291a591e3 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/info/TableRefInfo.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/info/TableRefInfo.java
@@ -25,6 +25,7 @@ import org.apache.doris.nereids.trees.TableSample;
 import org.apache.doris.qe.ConnectContext;
 
 import java.util.List;
+import java.util.Objects;
 
 /**
  * table ref info
@@ -51,6 +52,7 @@ public class TableRefInfo {
                         TableSnapshot tableSnapShot, PartitionNamesInfo 
partitionNamesInfo,
                         List<Long> tabletIdList, String tableAlias,
                         TableSample tableSample, List<String> relationHints) {
+        Objects.requireNonNull(tableNameInfo, "tableNameInfo is null");
         this.tableNameInfo = tableNameInfo;
         this.scanParams = scanParams;
         this.tableSnapShot = tableSnapShot;
@@ -87,7 +89,7 @@ public class TableRefInfo {
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
-        sb.append(tableNameInfo.getTbl());
+        sb.append(tableNameInfo);
         if (partitionNamesInfo != null) {
             sb.append(partitionNamesInfo.toSql());
         }
diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java 
b/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java
index 7e05466feda..4cf945e2e75 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java
@@ -3265,9 +3265,11 @@ public class FrontendServiceImpl implements 
FrontendService.Iface {
             TableSnapshot tableSnapshot = tableRef.getTableSnapshot();
             TableScanParams tableScanParams = tableRef.getScanParams();
 
-            TableNameInfo tableNameInfo = null;
+            TableNameInfo tableNameInfo;
             if (tableName != null) {
                 tableNameInfo = new TableNameInfo(tableName.getCtl(), 
tableName.getDb(), tableName.getTbl());
+            } else {
+                tableNameInfo = new TableNameInfo();
             }
 
             String tableAlias = aliases.length >= 1 ? aliases[0] : null;


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to