Skip to content

Commit d2275e7

Browse files
authored
[Fix](transactional-hive) Fix hive transactional table return empty result. (#28518)
1 parent 7da86c3 commit d2275e7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HiveMetaStoreCache.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,7 @@ public List<FileCacheValue> getFilesByTransaction(List<HivePartition> partitions
793793
directory = AcidUtils.getAcidState(new Path(partition.getPath()), jobConf, validWriteIds, false,
794794
true);
795795
}
796-
if (directory == null || directory.getBaseDirectory() == null) {
796+
if (directory == null) {
797797
return Collections.emptyList();
798798
}
799799
if (!directory.getOriginalFiles().isEmpty()) {
@@ -809,6 +809,9 @@ public List<FileCacheValue> getFilesByTransaction(List<HivePartition> partitions
809809
Path baseOrDeltaPath = directory.getBaseDirectory() != null ? directory.getBaseDirectory() :
810810
!directory.getCurrentDirectories().isEmpty() ? directory.getCurrentDirectories().get(0)
811811
.getPath() : null;
812+
if (baseOrDeltaPath == null) {
813+
return Collections.emptyList();
814+
}
812815
String acidVersionPath = new Path(baseOrDeltaPath, "_orc_acid_version").toUri().toString();
813816
RemoteFileSystem fs = Env.getCurrentEnv().getExtMetaCacheMgr().getFsCache().getRemoteFileSystem(
814817
new FileSystemCache.FileSystemCacheKey(

0 commit comments

Comments
 (0)