Skip to content

Commit

Permalink
[fix](multi-catalog)filter impala generated path (apache#28786)
Browse files Browse the repository at this point in the history
file impala generated dir _imapala_insert_staging
  • Loading branch information
wsjz authored and HappenLee committed Jan 12, 2024
1 parent e5aefb9 commit 61922ae
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 61922ae

Please sign in to comment.