Skip to content

Commit

Permalink
[fix](multi-catalog)filter impala generated path #28786 (#28917)
Browse files Browse the repository at this point in the history
bp: #28786
  • Loading branch information
wsjz authored Dec 23, 2023
1 parent 12b0d98 commit 7ba5734
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1068,17 +1068,18 @@ private boolean isFileVisible(Path path) {
return false;
}
for (String name : path.toString().split("/")) {
// generated by hive
if (name.startsWith(".hive-staging")) {
return false;
}
// generated by spark
if ("_temporary".equals(name)) {
if (isGeneratedPath(name)) {
return false;
}
}
return true;
}

private static boolean isGeneratedPath(String name) {
return "_temporary".equals(name) // generated by spark
|| "_imapala_insert_staging".equals(name) // generated by impala
|| name.startsWith(".hive-staging"); // generated by hive
}
}

@Data
Expand Down

0 comments on commit 7ba5734

Please sign in to comment.