[fix](multi-catalog)unsupported hive input format should throw an exception and remove useless method (#29087)
introduce from: #28644
This commit is contained in:
@ -203,12 +203,22 @@ public class HMSExternalTable extends ExternalTable {
|
||||
* Support managed_table and external_table.
|
||||
*/
|
||||
private boolean supportedHiveTable() {
|
||||
// we will return false if null, which means that the table type maybe unsupported.
|
||||
if (remoteTable.getSd() == null) {
|
||||
return false;
|
||||
}
|
||||
String inputFileFormat = remoteTable.getSd().getInputFormat();
|
||||
if (inputFileFormat == null) {
|
||||
return false;
|
||||
}
|
||||
boolean supportedFileFormat = SUPPORTED_HIVE_FILE_FORMATS.contains(inputFileFormat);
|
||||
if (!supportedFileFormat) {
|
||||
// for easier debugging, need return error message if unsupported input format is used.
|
||||
// NotSupportedException is required by some operation.
|
||||
throw new NotSupportedException("Unsupported hive input format: " + inputFileFormat);
|
||||
}
|
||||
LOG.debug("hms table {} is {} with file format: {}", name, remoteTable.getTableType(), inputFileFormat);
|
||||
return SUPPORTED_HIVE_FILE_FORMATS.contains(inputFileFormat);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -20,7 +20,6 @@ package org.apache.doris.common.util;
|
||||
import org.apache.doris.catalog.Column;
|
||||
import org.apache.doris.catalog.PrimitiveType;
|
||||
import org.apache.doris.common.AnalysisException;
|
||||
import org.apache.doris.common.Config;
|
||||
import org.apache.doris.common.FeNameFormat;
|
||||
import org.apache.doris.datasource.InternalCatalog;
|
||||
import org.apache.doris.qe.ConnectContext;
|
||||
@ -513,15 +512,6 @@ public class Util {
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isS3CompatibleStorageSchema(String schema) {
|
||||
for (String objectStorage : Config.s3_compatible_object_storages.split(",")) {
|
||||
if (objectStorage.equalsIgnoreCase(schema)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private static final char[] HEX_ARRAY = "0123456789ABCDEF".toCharArray();
|
||||
|
||||
public static String bytesToHex(byte[] bytes) {
|
||||
|
||||
Reference in New Issue
Block a user