zhengshengjun commented on a change in pull request #1532:
URL: https://github.com/apache/kylin/pull/1532#discussion_r551104943
##########
File path:
server-base/src/main/java/org/apache/kylin/rest/service/QueryService.java
##########
@@ -708,6 +708,22 @@ private SQLResponse queryWithSqlMassage(SQLRequest
sqlRequest) throws Exception
borrowPrepareContext = false;
preparedContext =
createPreparedContext(sqlRequest.getProject(), sqlRequest.getSql());
}
+
+ // when SparkEngine enabled, Execution Plan was created
from RelNode directly, RelNode should be cached
+ if (getConfig().isSparkEngineEnabled()) {
+ // preparedContext initialized by current thread, put
relNode into cache
+ if (preparedContext.olapRel == null) {
+ preparedContext.olapRel =
QueryContextFacade.current().getOlapRel();
+ preparedContext.resultType =
(QueryContextFacade.current().getResultType());
Review comment:
NoSuchElementException will no be thrown, because PreparedContextFactory
will create one
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]