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

yhcast0 pushed a commit to branch kylin5
in repository https://gitbox.apache.org/repos/asf/kylin.git


The following commit(s) were added to refs/heads/kylin5 by this push:
     new 99b0fc235e KYLIN-6003 fix metadata import (#2256)
99b0fc235e is described below

commit 99b0fc235e6341a88ad5111b298c81b3218e5ec7
Author: Guoliang Sun <[email protected]>
AuthorDate: Fri Feb 21 10:30:11 2025 +0800

    KYLIN-6003 fix metadata import (#2256)
    
    Co-authored-by: Zhimin Wu <[email protected]>
---
 .../src/main/java/org/apache/kylin/rest/service/MetaStoreService.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/src/modeling-service/src/main/java/org/apache/kylin/rest/service/MetaStoreService.java
 
b/src/modeling-service/src/main/java/org/apache/kylin/rest/service/MetaStoreService.java
index 8fe303356f..95c0528530 100644
--- 
a/src/modeling-service/src/main/java/org/apache/kylin/rest/service/MetaStoreService.java
+++ 
b/src/modeling-service/src/main/java/org/apache/kylin/rest/service/MetaStoreService.java
@@ -503,7 +503,8 @@ public class MetaStoreService extends BasicService {
     @VisibleForTesting
     public static String getModelMetadataProjectName(Map<String, RawResource> 
rawResourceMap) {
         RawResource raw = rawResourceMap.values().stream()
-                .filter(rawResource -> rawResource != null && 
rawResource.getProject() != null).findAny().orElse(null);
+                .filter(rawResource -> rawResource != null && 
rawResource.getProject() != null
+                        && rawResource.getMetaType() == 
MetadataType.MODEL).findAny().orElse(null);
         if (raw == null) {
             throw new KylinException(MODEL_METADATA_FILE_ERROR, 
MsgPicker.getMsg().getModelMetadataPackageInvalid());
         }

Reply via email to