[fix](multi-catalog)filter impala generated path (#28786)

file impala generated dir _imapala_insert_staging
This commit is contained in:
slothever
2023-12-22 21:58:50 +08:00
committed by GitHub
parent f781f0cf24
commit 3eec62e1d1

View File

@ -1068,17 +1068,18 @@ public class HiveMetaStoreCache {
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