zzcclp commented on a change in pull request #1532:
URL: https://github.com/apache/kylin/pull/1532#discussion_r551157923



##########
File path: 
server-base/src/main/java/org/apache/kylin/rest/service/QueryService.java
##########
@@ -703,11 +703,23 @@ private SQLResponse queryWithSqlMassage(SQLRequest 
sqlRequest) throws Exception
                 if (getConfig().isQueryPreparedStatementCacheEnable() && 
prepareSqlRequest.isEnableStatementCache()) {
                     try {
                         preparedContext = 
preparedContextPool.borrowObject(preparedContextKey);
+
+                        // preparedContext initialized by current thread, put 
relNode and resultType into cache
+                        if (preparedContext.olapRel == null) {
+                            preparedContext.olapRel = 
QueryContextFacade.current().getOlapRel();
+                            preparedContext.resultType = 
(QueryContextFacade.current().getResultType());
+                        } else {
+                            //set cached RelNode and ResultType in current 
QueryContext

Review comment:
       chang to 'set cached RelNode and ResultType **into** current 
QueryContext'




----------------------------------------------------------------
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]


Reply via email to