This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0 by this push:
new 50dba711bae [fix](multi-catalog)unsupported hive input format should
throw an exception and remove useless method. (#29228)
50dba711bae is described below
commit 50dba711bae3a57c6825df1c9f028f7797c6d2b3
Author: slothever <[email protected]>
AuthorDate: Thu Dec 28 22:38:45 2023 +0800
[fix](multi-catalog)unsupported hive input format should throw an exception
and remove useless method. (#29228)
from: #29087
---
.../org/apache/doris/catalog/external/HMSExternalTable.java | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/catalog/external/HMSExternalTable.java
b/fe/fe-core/src/main/java/org/apache/doris/catalog/external/HMSExternalTable.java
index 6937ba944f5..bbadac6ecbf 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/catalog/external/HMSExternalTable.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/catalog/external/HMSExternalTable.java
@@ -207,12 +207,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;
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]