Skip to content

Commit

Permalink
[Fix](transactional-hive) Fix hive transactional table return empty r…
Browse files Browse the repository at this point in the history
…esult.
  • Loading branch information
kaka11chen committed Dec 20, 2023
1 parent c16be3c commit 66c4305
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ public List<FileCacheValue> getFilesByTransaction(List<HivePartition> partitions
directory = AcidUtils.getAcidState(new Path(partition.getPath()), jobConf, validWriteIds, false,
true);
}
if (directory == null || directory.getBaseDirectory() == null) {
if (directory == null) {
return Collections.emptyList();
}
if (!directory.getOriginalFiles().isEmpty()) {
Expand All @@ -809,6 +809,9 @@ public List<FileCacheValue> getFilesByTransaction(List<HivePartition> partitions
Path baseOrDeltaPath = directory.getBaseDirectory() != null ? directory.getBaseDirectory() :
!directory.getCurrentDirectories().isEmpty() ? directory.getCurrentDirectories().get(0)
.getPath() : null;
if (baseOrDeltaPath == null) {
return Collections.emptyList();
}
String acidVersionPath = new Path(baseOrDeltaPath, "_orc_acid_version").toUri().toString();
RemoteFileSystem fs = Env.getCurrentEnv().getExtMetaCacheMgr().getFsCache().getRemoteFileSystem(
new FileSystemCache.FileSystemCacheKey(
Expand Down

0 comments on commit 66c4305

Please sign in to comment.