Java Code Examples for org.apache.kylin.rest.request.PrepareSqlRequest#setBackdoorToggles()

The following examples show how to use org.apache.kylin.rest.request.PrepareSqlRequest#setBackdoorToggles() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: QueryController.java    From kylin-on-parquet-v2 with Apache License 2.0 5 votes vote down vote up
@RequestMapping(value = "/query/prestate", method = RequestMethod.POST, produces = "application/json")
@ResponseBody
public SQLResponse prepareQuery(@RequestBody PrepareSqlRequest sqlRequest) {
    Map<String, String> newToggles = Maps.newHashMap();
    if (sqlRequest.getBackdoorToggles() != null)
        newToggles.putAll(sqlRequest.getBackdoorToggles());
    newToggles.put(BackdoorToggles.DEBUG_TOGGLE_PREPARE_ONLY, "true");
    sqlRequest.setBackdoorToggles(newToggles);

    return queryService.doQueryWithCache(sqlRequest);
}
 
Example 2
Source File: QueryController.java    From kylin with Apache License 2.0 5 votes vote down vote up
@RequestMapping(value = "/query/prestate", method = RequestMethod.POST, produces = "application/json")
@ResponseBody
public SQLResponse prepareQuery(@RequestBody PrepareSqlRequest sqlRequest) {
    Map<String, String> newToggles = Maps.newHashMap();
    if (sqlRequest.getBackdoorToggles() != null)
        newToggles.putAll(sqlRequest.getBackdoorToggles());
    newToggles.put(BackdoorToggles.DEBUG_TOGGLE_PREPARE_ONLY, "true");
    sqlRequest.setBackdoorToggles(newToggles);

    return queryService.doQueryWithCache(sqlRequest);
}