[ 
https://issues.apache.org/jira/browse/KYLIN-2806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16237373#comment-16237373
 ] 

finchye commented on KYLIN-2806:
--------------------------------

when I test the kylin-2.2.0 code,this problem still exists.
I find it cause by:
-------------------------------------------------------------------------------------------------------------------------------------
@Controller
public class QueryController extends BasicController {
.......

    // TODO should be just "prepare" a statement, get back expected 
ResultSetMetaData
    @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());
        {color:red}newToggles.put(BackdoorToggles.DEBUG_TOGGLE_PREPARE_ONLY, 
"true"); {color}
        sqlRequest.setBackdoorToggles(newToggles);

        return queryService.doQueryWithCache(sqlRequest);
    }
.....
}
----------------------------------------------------------------------------------------------
I don't know why here set "true", when I set it "false", it is ok to work

> Empty results from JDBC with Date filter in prepareStatement
> ------------------------------------------------------------
>
>                 Key: KYLIN-2806
>                 URL: https://issues.apache.org/jira/browse/KYLIN-2806
>             Project: Kylin
>          Issue Type: Bug
>          Components: Driver - JDBC, Query Engine
>    Affects Versions: v1.6.0, v2.0.0, v2.1.0
>         Environment: kylin版本:apache-kylin-1.6.0-cdh5.7-bin
> jdbc版本:kylin-jdbc-1.6.0.jar
> java版本:java version "1.8.0_92"
>            Reporter: chengwansheng
>            Assignee: Wang Cheng
>            Priority: Major
>              Labels: scope
>             Fix For: v2.2.0
>
>
> 用kylin的JDBC查询,查询条件是date类型的,如果通过prepareStatement、setDate是查询不出数据的,然而直接用SQL可以查出数据



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to