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

Jark Wu edited comment on FLINK-14441 at 10/18/19 2:03 AM:
-----------------------------------------------------------

Hi [~hailong wang], could you give an example where the expected class and 
result class are inconsistent. 

After going through the pull request, I don't think this is a bug. The Period 
literal is a value of {{YearMonthIntervalType}} which represents the number of 
months. So the corresponding primitive type of Period is {{Integer}}, you 
should use {{getValueAs(Integer)}} or {{getValueAs(Period)}} if the valueClass 
is Period. 


was (Author: jark):
Hi [~hailong wang], could you give an example where the expected class and 
result class are inconsistent. 

After going through the pull request, I don't think this is a bug. The Period 
literal is a value of {{YearMonthIntervalType}} which represents the number of 
months. So corresponding primitive type of Period is {{Integer}}, you should 
{{getValueAs(Integer)}} or {{getValueAs(Period)}} if the valueClass is Period. 

> Fix ValueLiteralExpression#getValueAs when valueClass is Period.class
> ---------------------------------------------------------------------
>
>                 Key: FLINK-14441
>                 URL: https://issues.apache.org/jira/browse/FLINK-14441
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Planner
>    Affects Versions: 1.10.0
>            Reporter: hailong wang
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.9.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> In ValueLiteralExpression#getValueAs, when valueClass is Period.class, the 
> expect class is inconsistent with the result class



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to