This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push:
new 29890827701 [fix](parse) set origin stmt for select stmt generated
from show stmt (#34015)
29890827701 is described below
commit 2989082770197c11c37e897c6d238fdbd605777a
Author: Mingyu Chen <[email protected]>
AuthorDate: Wed Apr 24 21:44:07 2024 +0800
[fix](parse) set origin stmt for select stmt generated from show stmt
(#34015)
* [fix](parse) set origin stmt for select stmt generated from show stmt
* 2
---
.../main/java/org/apache/doris/datasource/hive/HMSExternalTable.java | 4 ++--
fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HMSExternalTable.java
b/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HMSExternalTable.java
index 38556682ee0..e29bafd5dc7 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HMSExternalTable.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/datasource/hive/HMSExternalTable.java
@@ -268,11 +268,11 @@ public class HMSExternalTable extends ExternalTable
implements MTMVRelatedTableI
private boolean supportedHiveTable() {
// we will return false if null, which means that the table type maybe
unsupported.
if (remoteTable.getSd() == null) {
- return false;
+ throw new NotSupportedException("remote table's storage descriptor
is null");
}
String inputFileFormat = remoteTable.getSd().getInputFormat();
if (inputFileFormat == null) {
- return false;
+ throw new NotSupportedException("remote table's storage input
format is null");
}
boolean supportedFileFormat =
SUPPORTED_HIVE_FILE_FORMATS.contains(inputFileFormat);
if (!supportedFileFormat) {
diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java
b/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java
index 031062fbd76..be328bb1242 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java
@@ -1110,6 +1110,9 @@ public class StmtExecutor {
if (parsedStmt instanceof ShowStmt) {
SelectStmt selectStmt = ((ShowStmt)
parsedStmt).toSelectStmt(analyzer);
if (selectStmt != null) {
+ // Need to set origin stmt for new "parsedStmt"(which is
selectStmt here)
+ // Otherwise, the log printing may result in NPE
+ selectStmt.setOrigStmt(parsedStmt.getOrigStmt());
setParsedStmt(selectStmt);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]