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

ASF GitHub Bot commented on FLINK-11017:
----------------------------------------

dawidwys opened a new pull request #7200: [FLINK-11017][table] Throw exception 
if constant with YEAR TO MONTH resolution was used for group windows
URL: https://github.com/apache/flink/pull/7200
 
 
   ## What is the purpose of the change
   
   * Checking if a proper resolution was used for group window parameter. 
Without this check `INTERVAL '2-10' YEAR TO MONTH` would be a valid window size 
that would be translated to 34 milliseconds window.
   
   ## Brief change log
   
     - add check for proper `SqlTypeFamily`
     - fixed test so that they check if the expected exception was thrown 
(before `testWindowUdAggInvalidArgs` was passing because of wrong usage of 
`proctime()`)
   
   
   ## Verifying this change
   
`org.apache.flink.table.api.stream.sql.validation.WindowAggregateValidationTest#testWindowWrongWindowParameter`
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (yes / **no**)
     - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: (yes / **no**)
     - The serializers: (yes / **no** / don't know)
     - The runtime per-record code paths (performance sensitive): (yes / **no** 
/ don't know)
     - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Yarn/Mesos, ZooKeeper: (yes / **no** / don't know)
     - The S3 file system connector: (yes / **no** / don't know)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (yes / **no**)
     - If yes, how is the feature documented? (**not applicable** / docs / 
JavaDocs / not documented)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Time interval for window aggregations in SQL is wrongly translated if 
> specified with YEAR_MONTH resolution
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-11017
>                 URL: https://issues.apache.org/jira/browse/FLINK-11017
>             Project: Flink
>          Issue Type: Bug
>          Components: Table API & SQL
>    Affects Versions: 1.6.2, 1.7.0
>            Reporter: Dawid Wysakowicz
>            Assignee: Dawid Wysakowicz
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.6.3, 1.8.0, 1.7.1
>
>
> If a time interval was specified with {{YEAR TO MONTH}} resolution like e.g.:
> {code}
> SELECT * 
> FROM Mytable
> GROUP BY 
>     TUMBLE(rowtime, INTERVAL '1-2' YEAR TO MONTH)
> {code}
> it will be wrongly translated to 14 milliseconds window. We should allow for 
> only DAY TO SECOND resolution.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to