Repository: kylin Updated Branches: refs/heads/2.0.x-hbase0.98 b66c6b71c -> 2bc4f2283 (forced update)
KYLIN-2671 fix cache bug Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/b903a1ba Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/b903a1ba Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/b903a1ba Branch: refs/heads/2.0.x-hbase0.98 Commit: b903a1ba0bc170af22f3287dbc882f1c4984d943 Parents: d84e6c7 Author: Hongbin Ma <mahong...@apache.org> Authored: Tue Jul 4 14:58:18 2017 +0800 Committer: Hongbin Ma <mahong...@apache.org> Committed: Tue Jul 4 14:58:18 2017 +0800 ---------------------------------------------------------------------- .../apache/kylin/rest/controller/QueryController.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kylin/blob/b903a1ba/server-base/src/main/java/org/apache/kylin/rest/controller/QueryController.java ---------------------------------------------------------------------- diff --git a/server-base/src/main/java/org/apache/kylin/rest/controller/QueryController.java b/server-base/src/main/java/org/apache/kylin/rest/controller/QueryController.java index bf2cd8b..e9bddfd 100644 --- a/server-base/src/main/java/org/apache/kylin/rest/controller/QueryController.java +++ b/server-base/src/main/java/org/apache/kylin/rest/controller/QueryController.java @@ -26,7 +26,6 @@ import java.util.Map; import javax.servlet.http.HttpServletResponse; -import com.google.common.collect.Maps; import org.apache.commons.io.IOUtils; import org.apache.kylin.common.debug.BackdoorToggles; import org.apache.kylin.rest.exception.InternalErrorException; @@ -53,6 +52,8 @@ import org.supercsv.io.CsvListWriter; import org.supercsv.io.ICsvListWriter; import org.supercsv.prefs.CsvPreference; +import com.google.common.collect.Maps; + /** * Handle query requests. * @@ -76,10 +77,12 @@ public class QueryController extends BasicController { @RequestMapping(value = "/query/prestate", method = RequestMethod.POST, produces = "application/json") @ResponseBody public SQLResponse prepareQuery(@RequestBody PrepareSqlRequest sqlRequest) { - Map<String, String> toggles = Maps.newHashMap(); - toggles.put(BackdoorToggles.DEBUG_TOGGLE_PREPARE_ONLY, "true"); - BackdoorToggles.addToggles(toggles); - + + Map<String, String> newToggles = Maps.newHashMap(); + newToggles.putAll(sqlRequest.getBackdoorToggles()); + newToggles.put(BackdoorToggles.DEBUG_TOGGLE_PREPARE_ONLY, "true"); + sqlRequest.setBackdoorToggles(newToggles); + return queryService.doQueryWithCache(sqlRequest); }