You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@kylin.apache.org by Francis Liang <so...@hotmail.com> on 2018/11/05 02:51:22 UTC

答复: 回复:答复: Issues regarding multi date columns

Many thanks for this, Chao, and I will work on this. Best, Feng.

________________________________
发件人: Chao Long <wa...@qq.com>
发送时间: Friday, November 2, 2018 7:25:00 PM
收件人: user
主题: 回复:答复: Issues regarding multi date columns

Hi Feng,
  I create a jira for this issue.
  https://issues.apache.org/jira/browse/KYLIN-3665



------------------ 原始邮件 ------------------
发件人: "Francis Liang"<so...@hotmail.com>;
发送时间: 2018年11月2日(星期五) 晚上7:00
收件人: "user@kylin.apache.org"<us...@kylin.apache.org>;
主题: 答复: Issues regarding multi date columns

Hi Chao:

Many thanks for your help! I would like to do that but haven’t got too much experience on that. Maybe some one could help out and I would be more than happy to work on this. Thanks again, Chao.

Best, Feng

________________________________
发件人: Chao Long <wa...@qq.com>
发送时间: Friday, November 2, 2018 4:39:32 PM
收件人: user
主题: Re: Issues regarding multi date columns

Hi Feng,
  You are right, It seems a bug here. And would you like to open a jira issue and comtribute a pr/patch to Kylin?
  As a workaround, You can change the format of  column "day" to String(If it's ok for your case).


------------------ Original ------------------
From:  "Francis Liang"<so...@hotmail.com>;
Date:  Fri, Nov 2, 2018 03:59 PM
To:  "user@kylin.apache.org"<us...@kylin.apache.org>;
Subject:  Issues regarding multi date columns

Hi guys:

I am having an issure regarding using multi date columns as the partition columns for cube building.

Let’s say I have a fact table with two date partition column: day as the format of integer (yyyyMMdd) and minute as the format of string (HHmm). I have models created based on it and set the Partition Date Column to be “day” with the format of yyyyMMdd and the Partition Time Column to be “minute” with the format of HHmm. When I build the cube built on top of that model, I set the Start Date to be 2018-11-01 00:00:00 and the End Date to be 2018-11-01 01:00:00. The building process is supposed to retrieve the data from the fact table in the range of “day = 20181101 and minute>=’0000’ and minute<’0100’”. However, it retrieves the data in the range of “WHERE 1=1 AND (DAY >= 20181101 AND DAY < 20181101), so no data are actually retrieved.

When I went through the code, I was confused of the following snippet:
[cid:38935E07@97E7AF33.0C34DC5B]
If I read it right, the partition time column will never be added to the WHERE clause if the partition date column is type of int or bigint and the date format is "yyyyMMdd", "yyyyMMddHH", "yyyyMMddHHmm" or "yyyyMMddHHmmss", which is right my case.

I hope the above clarifies my issue and any help is appreciated.

Best, Feng