Hi Jean_Luc.:
You may need to rewrite your query like the below:
WHERE KYLIN_SALES.DT_PART = date ‘2012-06-24’
Actually, ‘date’ type in kylin should be used like the below:
select TRANS_ID,PART_DT,PRICE from KYLIN_SALES where PART_DT =date '2012-01-01’
OR
select TRANS_ID,PART_DT,PRICE from KYLIN_SALES where PART_DT =cast
('2012-01-01' as date)
> 在 2018年2月16日,下午9:17,Jean-Luc BELLIER (JIRA) <[email protected]> 写道:
>
> Jean-Luc BELLIER created KYLIN-3256:
> ---------------------------------------
>
> Summary: Filter of dates do not work
> Key: KYLIN-3256
> URL: https://issues.apache.org/jira/browse/KYLIN-3256
> Project: Kylin
> Issue Type: Bug
> Affects Versions: v2.2.0
> Reporter: Jean-Luc BELLIER
>
>
> Hello,
>
>
>
> I am wondering how to filter date columns with Kylin.
>
> I am working with the sample cube of the learn_kylin project. I have slightly
> modified the cube to add a few more columns, but that is all.
>
> In the advanced section, I put KYLIN_SALES.PART_DT in the 'Rowkeys' section,
> defined as 'date' type.
>
>
>
> I would like to add a filter like 'WHERE KYLIN_SALES.DT_PART = '2012-06-24'
>
> but the Kylin interface gives me a mistake : 'error while compiling generated
> Java code'
>
> This works fine with hive console.
>
> I also tried with TO_DATE('2012-06-24').
>
> Using "WHERE KYLIN_SALES.DT_PART BETWEEN '2012-06-24' AND '2012-06-25'", it
> works fine.
>
>
>
> Are there limitations or internal transformations on the 'date' type in
> Kylin ?
>
>
>
> Thank you for your help. Have a good day.
>
>
>
> Best regards;
>
> Jean-Luc.
>
>
>
> --
> This message was sent by Atlassian JIRA
> (v7.6.3#76005)