Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix](multi-catalog)unsupported hive input format should throw an exception and remove useless method. #29087

Merged
merged 1 commit into from
Dec 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1679,12 +1679,6 @@ public class Config extends ConfigBase {
@ConfField(mutable = true)
public static boolean enable_decimal_conversion = true;

/**
* List of S3 API compatible object storage systems.
*/
@ConfField
public static String s3_compatible_object_storages = "s3,oss,cos,bos";

/**
* Support complex data type ARRAY.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,22 @@ public boolean isHoodieCowTable() {
* 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;
}

/**
Expand Down
10 changes: 0 additions & 10 deletions fe/fe-core/src/main/java/org/apache/doris/common/util/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
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;
Expand Down Expand Up @@ -513,15 +512,6 @@ public static void prohibitExternalCatalog(String catalog, String msg) throws An
}
}

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) {
Expand Down
Loading