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

kxiao pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git

commit e6a4c21571e424a9a6db052a3181018056f8578f
Author: Calvin Kirs <[email protected]>
AuthorDate: Tue Sep 19 22:57:13 2023 +0800

    [Fix](RoutineLoad)multi-table query table error (#24538)
    
    multi-table will take all tables and then convert them into OlapTable, thus 
causing View type conversion errors.
---
 .../src/main/java/org/apache/doris/service/FrontendServiceImpl.java   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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 3cb6e15d4e..96d0063d6e 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
@@ -1894,7 +1894,9 @@ public class FrontendServiceImpl implements 
FrontendService.Iface {
                 throw new MetaNotFoundException("table not found");
             }
             olapTables = new ArrayList<>(tableNames.size());
-            Map<String, OlapTable> olapTableMap = 
tables.stream().map(OlapTable.class::cast)
+            Map<String, OlapTable> olapTableMap = tables.stream()
+                    .filter(OlapTable.class::isInstance)
+                    .map(OlapTable.class::cast)
                     .collect(Collectors.toMap(OlapTable::getName, olapTable -> 
olapTable));
             for (String tableName : tableNames) {
                 if (null == olapTableMap.get(tableName)) {


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

Reply via email to