You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2022/07/07 10:51:16 UTC
[doris] branch dev-1.0.1 updated: [hotfix](dev-1.0.1) Avoid VecNotImplementException for create view operation (#10676)
This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch dev-1.0.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/dev-1.0.1 by this push:
new d56a32944b [hotfix](dev-1.0.1) Avoid VecNotImplementException for create view operation (#10676)
d56a32944b is described below
commit d56a32944bdb0fa8bcbbad44ad4e4217e51983a3
Author: Mingyu Chen <mo...@gmail.com>
AuthorDate: Thu Jul 7 18:51:12 2022 +0800
[hotfix](dev-1.0.1) Avoid VecNotImplementException for create view operation (#10676)
---
.../java/org/apache/doris/analysis/CreateViewStmt.java | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/CreateViewStmt.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/CreateViewStmt.java
index cc32ab7dec..26faab87b8 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/CreateViewStmt.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/CreateViewStmt.java
@@ -23,9 +23,9 @@ import org.apache.doris.common.ErrorReport;
import org.apache.doris.common.UserException;
import org.apache.doris.mysql.privilege.PrivPredicate;
import org.apache.doris.qe.ConnectContext;
+import org.apache.doris.qe.SessionVariable;
import com.google.common.base.Strings;
-
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -58,14 +58,22 @@ public class CreateViewStmt extends BaseViewStmt {
viewDefStmt.setNeedToSql(true);
// check privilege
- if (!Catalog.getCurrentCatalog().getAuth().checkTblPriv(ConnectContext.get(), tableName.getDb(),
- tableName.getTbl(), PrivPredicate.CREATE)) {
+ if (!Catalog.getCurrentCatalog().getAuth()
+ .checkTblPriv(ConnectContext.get(), tableName.getDb(), tableName.getTbl(), PrivPredicate.CREATE)) {
ErrorReport.reportAnalysisException(ErrorCode.ERR_SPECIFIC_ACCESS_DENIED_ERROR, "CREATE");
}
- // Do not rewrite nondeterministic functions to constant in create view's def stmt
+ boolean originEnableVec = true;
if (ConnectContext.get() != null) {
+ // Do not rewrite nondeterministic functions to constant in create view's def stmt
ConnectContext.get().setNotEvalNondeterministicFunction(true);
+ // Because in current v1.1, the vec engine do not support some of outer join sql.
+ // So it we set enable_vectorized_engine = true, it may throw VecNotImplementExcetion.
+ // But it is not necessary because here we only neet to pass the analysis phase,
+ // So here we temporarily set enable_vectorized_engine = false to avoid this expcetion.
+ SessionVariable sv = ConnectContext.get().getSessionVariable();
+ originEnableVec = sv.enableVectorizedEngine;
+ sv.setEnableVectorizedEngine(false);
}
try {
if (cols != null) {
@@ -82,6 +90,8 @@ public class CreateViewStmt extends BaseViewStmt {
// will not do constant fold for nondeterministic functions.
if (ConnectContext.get() != null) {
ConnectContext.get().setNotEvalNondeterministicFunction(false);
+ SessionVariable sv = ConnectContext.get().getSessionVariable();
+ sv.setEnableVectorizedEngine(originEnableVec);
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org