[fix](multi-catalog)add exception for unsupported hive input format (#25490)

add exception for unsupported hive input format
This commit is contained in:
slothever
2023-10-17 22:53:53 +08:00
committed by GitHub
parent b76e23fb34
commit 26e332c608
2 changed files with 15 additions and 2 deletions

View File

@ -198,9 +198,15 @@ public class HMSExternalTable extends ExternalTable {
*/
private boolean supportedHiveTable() {
String inputFileFormat = remoteTable.getSd().getInputFormat();
boolean supportedFileFormat = inputFileFormat != null && SUPPORTED_HIVE_FILE_FORMATS.contains(inputFileFormat);
if (inputFileFormat == null) {
return false;
}
boolean supportedFileFormat = SUPPORTED_HIVE_FILE_FORMATS.contains(inputFileFormat);
if (!supportedFileFormat) {
throw new IllegalArgumentException("Unsupported hive input format: " + inputFileFormat);
}
LOG.debug("hms table {} is {} with file format: {}", name, remoteTable.getTableType(), inputFileFormat);
return supportedFileFormat;
return true;
}
/**