xy720 commented on a change in pull request #6096: URL: https://github.com/apache/incubator-doris/pull/6096#discussion_r667986535
########## File path: fe/fe-core/src/main/java/org/apache/doris/analysis/CreateViewStmt.java ########## @@ -63,6 +63,11 @@ public void analyze(Analyzer analyzer) throws UserException { ErrorReport.reportAnalysisException(ErrorCode.ERR_SPECIFIC_ACCESS_DENIED_ERROR, "CREATE"); } + // Do not rewrite nondeterministic functions to constant in create view's def stmt + if (ConnectContext.get() != null) { + ConnectContext.get().setNotEvalNondeterministicFunction(true); Review comment: When will it set back to false? ########## File path: fe/fe-core/src/main/java/org/apache/doris/analysis/CreateViewStmt.java ########## @@ -63,6 +63,11 @@ public void analyze(Analyzer analyzer) throws UserException { ErrorReport.reportAnalysisException(ErrorCode.ERR_SPECIFIC_ACCESS_DENIED_ERROR, "CREATE"); } + // Do not rewrite nondeterministic functions to constant in create view's def stmt + if (ConnectContext.get() != null) { + ConnectContext.get().setNotEvalNondeterministicFunction(true); Review comment: Will it be set back to false after statement finish? ########## File path: fe/fe-core/src/main/java/org/apache/doris/analysis/CreateViewStmt.java ########## @@ -63,6 +63,11 @@ public void analyze(Analyzer analyzer) throws UserException { ErrorReport.reportAnalysisException(ErrorCode.ERR_SPECIFIC_ACCESS_DENIED_ERROR, "CREATE"); } + // Do not rewrite nondeterministic functions to constant in create view's def stmt + if (ConnectContext.get() != null) { + ConnectContext.get().setNotEvalNondeterministicFunction(true); Review comment: Will it be set back to false after statement is executed? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org