lincoln-lil opened a new pull request, #25075:
URL: https://github.com/apache/flink/pull/25075

   ## What is the purpose of the change
   Non-mergeable proctime tvf window aggregate needs to fallback to group 
aggregate, e.g.,
   ```sql
   select c, count(a)
   from
      TABLE(CUMULATE(table MyTable, DESCRIPTOR(proctime), interval '10' 
seconds, interval '5' minutes))
   where window_start <> '123'
   group by window_start, window_end, c, window_time
   ```
   the window property in above query was materialized before aggregation, so 
it lost processing time attribute and cause the planner failed to pull up 
`StreamPhysicalWindowTableFunction` into the `StreamPhysicalWindowAggregate` to 
generate a valid execution plan, which goes into the attached window strategy 
which relies on the upstream watermark but lacks of a watermark assigner.
   So, semantically when the window time attribute was materialized after 
window table function, the downstream aggregation should use group aggregation.
   
   ## Brief change log
   * update `WindowUtil`#isValidWindowAggregate to check the invalid patterns
   
   ## Verifying this change
   * added related test cases into `WindowAggregateTest`
   
   ## Does this pull request potentially affect one of the following parts:
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API, i.e., is any changed class annotated with 
@Public(Evolving): (no)
     - The serializers: (no )
     - The runtime per-record code paths (performance sensitive): (no)
     - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (no)
     - The S3 file system connector: (no)
   
   ## Documentation
     - Does this pull request introduce a new feature? (no)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to