This is an automated email from the ASF dual-hosted git repository.
morrysnow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 0ef958f228 [enhancement](nereids) Forbid analyze view (#18522)
0ef958f228 is described below
commit 0ef958f228ab6bb95b12d903539d85ee5ecec00c
Author: AKIRA <[email protected]>
AuthorDate: Tue Apr 11 17:11:06 2023 +0900
[enhancement](nereids) Forbid analyze view (#18522)
---
fe/fe-core/src/main/java/org/apache/doris/analysis/AnalyzeStmt.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/analysis/AnalyzeStmt.java
b/fe/fe-core/src/main/java/org/apache/doris/analysis/AnalyzeStmt.java
index bdbbc6763f..fe0b8bab2b 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/AnalyzeStmt.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/AnalyzeStmt.java
@@ -24,6 +24,7 @@ import org.apache.doris.catalog.Env;
import org.apache.doris.catalog.OlapTable;
import org.apache.doris.catalog.Partition;
import org.apache.doris.catalog.TableIf;
+import org.apache.doris.catalog.View;
import org.apache.doris.common.AnalysisException;
import org.apache.doris.common.Config;
import org.apache.doris.common.ErrorCode;
@@ -110,7 +111,9 @@ public class AnalyzeStmt extends DdlStmt {
DatabaseIf db = catalog.getDbOrAnalysisException(dbName);
dbId = db.getId();
table = db.getTableOrAnalysisException(tblName);
-
+ if (table instanceof View) {
+ throw new AnalysisException("Analyze view is not allowed");
+ }
checkAnalyzePriv(dbName, tblName);
if (columnNames != null && !columnNames.isEmpty()) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]