[fix](multi-catalog)add exception for unsupported hive input format (#25490)
add exception for unsupported hive input format
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user