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

longfeiJiang edited comment on KYLIN-5499 at 4/6/23 7:43 AM:
-------------------------------------------------------------

*Root Cause*

The model of the SQL hit is the partition column format as follows _yyyy-MM-dd_
 !image-2023-04-06-15-35-35-934.png! 
The data type of the F_LOSS.SYSTEM_RUN_DATE field in the hive table is TimeStamp
 !image-2023-04-06-15-36-18-911.png! 

Convert the start/end range of the first Segment of the model into the format 
string of the model time partition column _ 1657497600000 -> "2022-07-11"_
 !image-2023-04-06-15-39-54-901.png! 

And in transformValue2RexLiteral method,change input to  RexLiteral 
Since the type of the partition column field is TimeStamp, it will enter the 
corresponding branch.
 !image-2023-04-06-15-41-10-625.png! 

In new TimestampString(value) ,  regular matching fails, report error .
 !image-2023-04-06-15-42-14-808.png! 


The data type of the time partition column used by the model in the source 
table is Timestamp type.
The format of the model time partition column needs to be set to the following 
two formats, otherwise an error will be reported when entering this method.
* yyyy-MM-dd HH:mm:ss
* yyyy-MM-dd HH:mm:ss.SSS


was (Author: JIRAUSER298472):
*Root Cause*

The model of the SQL hit is the partition column format as follows _yyyy-MM-dd_
 !image-2023-04-06-15-35-35-934.png! 
The data type of the F_LOSS.SYSTEM_RUN_DATE field in the hive table is TimeStamp
 !image-2023-04-06-15-36-18-911.png! 

Convert the start/end range of the first Segment of the model into the format 
string of the model time partition column _ 1657497600000 -> "2022-07-11"_
 !image-2023-04-06-15-39-54-901.png! 

And in transformValue2RexLiteral method,change input to  RexLiteral 
Since the type of the partition column field is TimeStamp, it will enter the 
corresponding branch.
 !image-2023-04-06-15-41-10-625.png! 

In new TimestampString(value) ,  regular matching fails, report error .
 !image-2023-04-06-15-42-14-808.png! 


> Error is reported when query with the time partition column filter.
> -------------------------------------------------------------------
>
>                 Key: KYLIN-5499
>                 URL: https://issues.apache.org/jira/browse/KYLIN-5499
>             Project: Kylin
>          Issue Type: Bug
>            Reporter: longfeiJiang
>            Assignee: longfeiJiang
>            Priority: Major
>         Attachments: image-2023-04-06-15-35-35-934.png, 
> image-2023-04-06-15-36-18-911.png, image-2023-04-06-15-39-54-901.png, 
> image-2023-04-06-15-41-10-625.png, image-2023-04-06-15-42-14-808.png
>
>
> Set the column whose data type is timestamp in the source table to the 
> yyyy-MM-dd format when setting the partition column, and configure not to 
> check the format of the partition column in building job, an error is 
> reported when query with the time partition column filter.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to