You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/01/28 09:07:17 UTC

[GitHub] [flink] HuangXingBo opened a new pull request #14791: [FLINK-21168][python][table-planner-blink] Add support for general python group window aggregate function in Physical Rule and Node

HuangXingBo opened a new pull request #14791:
URL: https://github.com/apache/flink/pull/14791


   ## What is the purpose of the change
   
   *This pull request will add support for general python group window aggregate function in Physical Rule and Node*
   
   
   ## Brief change log
   
     - *Add the logic of support for general python window agg in rule and node*
   
   ## Verifying this change
   
   This change added tests and can be verified as follows:
   
     - *UT `PythonGroupWindowAggregateTest`*
   
   ## 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/Mesos, ZooKeeper: (no)
     - The S3 file system connector: (no)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (no)
     - If yes, how is the feature documented? (not applicable)
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14791: [FLINK-21168][python][table-planner-blink] Add support for general python group window aggregate function in Physical Rule and Node

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14791:
URL: https://github.com/apache/flink/pull/14791#issuecomment-768926023


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597",
       "triggerID" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597",
       "triggerID" : "769522291",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "c229b2c09cf62019cc497edb8dd7fc84dc64fc0b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12900",
       "triggerID" : "c229b2c09cf62019cc497edb8dd7fc84dc64fc0b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "192b64ca6ae0f6fac76ab644e2ef4a5b043503d1",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13691",
       "triggerID" : "192b64ca6ae0f6fac76ab644e2ef4a5b043503d1",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6812a3558513535d3f9adf2e2eca4c951b31a34c",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13949",
       "triggerID" : "6812a3558513535d3f9adf2e2eca4c951b31a34c",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f8a7a7bb160d9db1c23557eb2a112ed018b94d52",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13961",
       "triggerID" : "f8a7a7bb160d9db1c23557eb2a112ed018b94d52",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a5e8e8d0eaf9bada45994a03ce2eb4d69d5027e4",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13967",
       "triggerID" : "a5e8e8d0eaf9bada45994a03ce2eb4d69d5027e4",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f8a7a7bb160d9db1c23557eb2a112ed018b94d52 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13961) 
   * a5e8e8d0eaf9bada45994a03ce2eb4d69d5027e4 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13967) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] amaliujia commented on a change in pull request #14791: [FLINK-21168][python][table-planner-blink] Add support for general python group window aggregate function in Physical Rule and Node

Posted by GitBox <gi...@apache.org>.
amaliujia commented on a change in pull request #14791:
URL: https://github.com/apache/flink/pull/14791#discussion_r569191629



##########
File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/plan/rules/physical/stream/StreamPhysicalPythonGroupWindowAggregateRule.java
##########
@@ -78,11 +78,11 @@ public boolean matches(RelOptRuleCall call) {
                         .anyMatch(x -> PythonUtil.isPythonAggregate(x, PythonFunctionKind.PANDAS));
         boolean existJavaFunction =
                 aggCalls.stream().anyMatch(x -> !PythonUtil.isPythonAggregate(x, null));
+        if (existPandasFunction && existGeneralPythonFunction) {
+            throw new TableException(

Review comment:
       Also this might be your design decision before: why throw a exception than return false to indicate this rule does not match the case when both general python function and pandas functions appear together? 




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14791: [FLINK-21168][python][table-planner-blink] Add support for general python group window aggregate function in Physical Rule and Node

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14791:
URL: https://github.com/apache/flink/pull/14791#issuecomment-768926023


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597",
       "triggerID" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597",
       "triggerID" : "769522291",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "c229b2c09cf62019cc497edb8dd7fc84dc64fc0b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12900",
       "triggerID" : "c229b2c09cf62019cc497edb8dd7fc84dc64fc0b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "192b64ca6ae0f6fac76ab644e2ef4a5b043503d1",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13691",
       "triggerID" : "192b64ca6ae0f6fac76ab644e2ef4a5b043503d1",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6812a3558513535d3f9adf2e2eca4c951b31a34c",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13949",
       "triggerID" : "6812a3558513535d3f9adf2e2eca4c951b31a34c",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f8a7a7bb160d9db1c23557eb2a112ed018b94d52",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13961",
       "triggerID" : "f8a7a7bb160d9db1c23557eb2a112ed018b94d52",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a5e8e8d0eaf9bada45994a03ce2eb4d69d5027e4",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13967",
       "triggerID" : "a5e8e8d0eaf9bada45994a03ce2eb4d69d5027e4",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 6812a3558513535d3f9adf2e2eca4c951b31a34c Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13949) 
   * f8a7a7bb160d9db1c23557eb2a112ed018b94d52 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13961) 
   * a5e8e8d0eaf9bada45994a03ce2eb4d69d5027e4 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13967) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14791: [FLINK-21168][python][table-planner-blink] Add support for general python group window aggregate function in Physical Rule and Node

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14791:
URL: https://github.com/apache/flink/pull/14791#issuecomment-768926023


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597",
       "triggerID" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597",
       "triggerID" : "769522291",
       "triggerType" : "MANUAL"
     } ]
   }-->
   ## CI report:
   
   * 3a234c3d0715f62569393b208f6b858e7a2508fb Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14791: [FLINK-21168][python][table-planner-blink] Add support for general python group window aggregate function in Physical Rule and Node

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14791:
URL: https://github.com/apache/flink/pull/14791#issuecomment-768926023


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597",
       "triggerID" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597",
       "triggerID" : "769522291",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "c229b2c09cf62019cc497edb8dd7fc84dc64fc0b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12900",
       "triggerID" : "c229b2c09cf62019cc497edb8dd7fc84dc64fc0b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "192b64ca6ae0f6fac76ab644e2ef4a5b043503d1",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13691",
       "triggerID" : "192b64ca6ae0f6fac76ab644e2ef4a5b043503d1",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6812a3558513535d3f9adf2e2eca4c951b31a34c",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13949",
       "triggerID" : "6812a3558513535d3f9adf2e2eca4c951b31a34c",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f8a7a7bb160d9db1c23557eb2a112ed018b94d52",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13961",
       "triggerID" : "f8a7a7bb160d9db1c23557eb2a112ed018b94d52",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a5e8e8d0eaf9bada45994a03ce2eb4d69d5027e4",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13967",
       "triggerID" : "a5e8e8d0eaf9bada45994a03ce2eb4d69d5027e4",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a5e8e8d0eaf9bada45994a03ce2eb4d69d5027e4 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13967) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14791: [FLINK-21168][python][table-planner-blink] Add support for general python group window aggregate function in Physical Rule and Node

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14791:
URL: https://github.com/apache/flink/pull/14791#issuecomment-768926023


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597",
       "triggerID" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597",
       "triggerID" : "769522291",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "c229b2c09cf62019cc497edb8dd7fc84dc64fc0b",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12900",
       "triggerID" : "c229b2c09cf62019cc497edb8dd7fc84dc64fc0b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "192b64ca6ae0f6fac76ab644e2ef4a5b043503d1",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13691",
       "triggerID" : "192b64ca6ae0f6fac76ab644e2ef4a5b043503d1",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * c229b2c09cf62019cc497edb8dd7fc84dc64fc0b Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12900) 
   * 192b64ca6ae0f6fac76ab644e2ef4a5b043503d1 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13691) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14791: [FLINK-21168][python][table-planner-blink] Add support for general python group window aggregate function in Physical Rule and Node

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14791:
URL: https://github.com/apache/flink/pull/14791#issuecomment-768926023


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597",
       "triggerID" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597",
       "triggerID" : "769522291",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "c229b2c09cf62019cc497edb8dd7fc84dc64fc0b",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12900",
       "triggerID" : "c229b2c09cf62019cc497edb8dd7fc84dc64fc0b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 3a234c3d0715f62569393b208f6b858e7a2508fb Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597) 
   * c229b2c09cf62019cc497edb8dd7fc84dc64fc0b Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12900) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] HuangXingBo commented on a change in pull request #14791: [FLINK-21168][python][table-planner-blink] Add support for general python group window aggregate function in Physical Rule and Node

Posted by GitBox <gi...@apache.org>.
HuangXingBo commented on a change in pull request #14791:
URL: https://github.com/apache/flink/pull/14791#discussion_r569195396



##########
File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/plan/rules/physical/stream/StreamPhysicalPythonGroupWindowAggregateRule.java
##########
@@ -78,11 +78,11 @@ public boolean matches(RelOptRuleCall call) {
                         .anyMatch(x -> PythonUtil.isPythonAggregate(x, PythonFunctionKind.PANDAS));
         boolean existJavaFunction =
                 aggCalls.stream().anyMatch(x -> !PythonUtil.isPythonAggregate(x, null));
+        if (existPandasFunction && existGeneralPythonFunction) {
+            throw new TableException(
+                    "Pandas UDAFs and General Python UDAFs are not supported in used together currently.");

Review comment:
       The serializer used by general UDF and pandas cannot be easily used in the same data channel. So for `General UDF` and `Pandas UDF`, we added a special logical rule(`PythonCalcSplitPandasInProjectionRule`) to separate them into the different operator, but for `UDAF`, we can't separate these `UDAF`s into different operators.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] HuangXingBo commented on a change in pull request #14791: [FLINK-21168][python][table-planner-blink] Add support for general python group window aggregate function in Physical Rule and Node

Posted by GitBox <gi...@apache.org>.
HuangXingBo commented on a change in pull request #14791:
URL: https://github.com/apache/flink/pull/14791#discussion_r584673665



##########
File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/stream/StreamExecPythonGroupWindowAggregate.java
##########
@@ -343,4 +444,60 @@ public StreamExecPythonGroupWindowAggregate(
                     e);
         }
     }
+
+    @SuppressWarnings({"unchecked", "rawtypes"})
+    private OneInputStreamOperator<RowData, RowData>
+            getGeneralPythonStreamGroupWindowAggregateFunctionOperator(

Review comment:
       Yes. We still need `allowLateness `




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14791: [FLINK-21168][python][table-planner-blink] Add support for general python group window aggregate function in Physical Rule and Node

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14791:
URL: https://github.com/apache/flink/pull/14791#issuecomment-768926023


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597",
       "triggerID" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597",
       "triggerID" : "769522291",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "c229b2c09cf62019cc497edb8dd7fc84dc64fc0b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12900",
       "triggerID" : "c229b2c09cf62019cc497edb8dd7fc84dc64fc0b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "192b64ca6ae0f6fac76ab644e2ef4a5b043503d1",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13691",
       "triggerID" : "192b64ca6ae0f6fac76ab644e2ef4a5b043503d1",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6812a3558513535d3f9adf2e2eca4c951b31a34c",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13949",
       "triggerID" : "6812a3558513535d3f9adf2e2eca4c951b31a34c",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 192b64ca6ae0f6fac76ab644e2ef4a5b043503d1 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13691) 
   * 6812a3558513535d3f9adf2e2eca4c951b31a34c Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13949) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14791: [FLINK-21168][python][table-planner-blink] Add support for general python group window aggregate function in Physical Rule and Node

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14791:
URL: https://github.com/apache/flink/pull/14791#issuecomment-768926023


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597",
       "triggerID" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597",
       "triggerID" : "769522291",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "c229b2c09cf62019cc497edb8dd7fc84dc64fc0b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12900",
       "triggerID" : "c229b2c09cf62019cc497edb8dd7fc84dc64fc0b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "192b64ca6ae0f6fac76ab644e2ef4a5b043503d1",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13691",
       "triggerID" : "192b64ca6ae0f6fac76ab644e2ef4a5b043503d1",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6812a3558513535d3f9adf2e2eca4c951b31a34c",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13949",
       "triggerID" : "6812a3558513535d3f9adf2e2eca4c951b31a34c",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f8a7a7bb160d9db1c23557eb2a112ed018b94d52",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13961",
       "triggerID" : "f8a7a7bb160d9db1c23557eb2a112ed018b94d52",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a5e8e8d0eaf9bada45994a03ce2eb4d69d5027e4",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "a5e8e8d0eaf9bada45994a03ce2eb4d69d5027e4",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 6812a3558513535d3f9adf2e2eca4c951b31a34c Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13949) 
   * f8a7a7bb160d9db1c23557eb2a112ed018b94d52 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13961) 
   * a5e8e8d0eaf9bada45994a03ce2eb4d69d5027e4 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] HuangXingBo commented on a change in pull request #14791: [FLINK-21168][python][table-planner-blink] Add support for general python group window aggregate function in Physical Rule and Node

Posted by GitBox <gi...@apache.org>.
HuangXingBo commented on a change in pull request #14791:
URL: https://github.com/apache/flink/pull/14791#discussion_r569200084



##########
File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/plan/rules/physical/stream/StreamPhysicalPythonGroupWindowAggregateRule.java
##########
@@ -98,7 +98,12 @@ public RelNode convert(RelNode rel) {
         FlinkLogicalWindowAggregate agg = (FlinkLogicalWindowAggregate) rel;
         LogicalWindow window = agg.getWindow();
 
-        if (window instanceof SessionGroupWindow) {
+        List<AggregateCall> aggCalls = agg.getAggCallList();
+        boolean isPandasPythonUDAF =
+                aggCalls.stream()
+                        .anyMatch(x -> PythonUtil.isPythonAggregate(x, PythonFunctionKind.PANDAS));
+
+        if (isPandasPythonUDAF && window instanceof SessionGroupWindow) {
             throw new TableException("Session Group Window is currently not supported.");

Review comment:
       This is only temporarily not supported, and there are design solutions for this part in [FLIP-137.](https://cwiki.apache.org/confluence/display/FLINK/FLIP-137%3A+Support+Pandas+UDAF+in+PyFlink) 




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14791: [FLINK-21168][python][table-planner-blink] Add support for general python group window aggregate function in Physical Rule and Node

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14791:
URL: https://github.com/apache/flink/pull/14791#issuecomment-768926023


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597",
       "triggerID" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597",
       "triggerID" : "769522291",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "c229b2c09cf62019cc497edb8dd7fc84dc64fc0b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12900",
       "triggerID" : "c229b2c09cf62019cc497edb8dd7fc84dc64fc0b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "192b64ca6ae0f6fac76ab644e2ef4a5b043503d1",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13691",
       "triggerID" : "192b64ca6ae0f6fac76ab644e2ef4a5b043503d1",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6812a3558513535d3f9adf2e2eca4c951b31a34c",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "6812a3558513535d3f9adf2e2eca4c951b31a34c",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 192b64ca6ae0f6fac76ab644e2ef4a5b043503d1 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13691) 
   * 6812a3558513535d3f9adf2e2eca4c951b31a34c UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] HuangXingBo commented on pull request #14791: [FLINK-21168][python][table-planner-blink] Add support for general python group window aggregate function in Physical Rule and Node

Posted by GitBox <gi...@apache.org>.
HuangXingBo commented on pull request #14791:
URL: https://github.com/apache/flink/pull/14791#issuecomment-788009498


   @WeiZhong94 Thanks a lot for the review. I have addressed the comments at the latest commit.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14791: [FLINK-21168][python][table-planner-blink] Add support for general python group window aggregate function in Physical Rule and Node

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14791:
URL: https://github.com/apache/flink/pull/14791#issuecomment-768926023


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597",
       "triggerID" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597",
       "triggerID" : "769522291",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "c229b2c09cf62019cc497edb8dd7fc84dc64fc0b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12900",
       "triggerID" : "c229b2c09cf62019cc497edb8dd7fc84dc64fc0b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "192b64ca6ae0f6fac76ab644e2ef4a5b043503d1",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13691",
       "triggerID" : "192b64ca6ae0f6fac76ab644e2ef4a5b043503d1",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6812a3558513535d3f9adf2e2eca4c951b31a34c",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13949",
       "triggerID" : "6812a3558513535d3f9adf2e2eca4c951b31a34c",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 6812a3558513535d3f9adf2e2eca4c951b31a34c Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13949) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14791: [FLINK-21168][python][table-planner-blink] Add support for general python group window aggregate function in Physical Rule and Node

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14791:
URL: https://github.com/apache/flink/pull/14791#issuecomment-768926023


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597",
       "triggerID" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597",
       "triggerID" : "769522291",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "c229b2c09cf62019cc497edb8dd7fc84dc64fc0b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12900",
       "triggerID" : "c229b2c09cf62019cc497edb8dd7fc84dc64fc0b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "192b64ca6ae0f6fac76ab644e2ef4a5b043503d1",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13691",
       "triggerID" : "192b64ca6ae0f6fac76ab644e2ef4a5b043503d1",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6812a3558513535d3f9adf2e2eca4c951b31a34c",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13949",
       "triggerID" : "6812a3558513535d3f9adf2e2eca4c951b31a34c",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f8a7a7bb160d9db1c23557eb2a112ed018b94d52",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "f8a7a7bb160d9db1c23557eb2a112ed018b94d52",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 6812a3558513535d3f9adf2e2eca4c951b31a34c Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13949) 
   * f8a7a7bb160d9db1c23557eb2a112ed018b94d52 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] amaliujia commented on a change in pull request #14791: [FLINK-21168][python][table-planner-blink] Add support for general python group window aggregate function in Physical Rule and Node

Posted by GitBox <gi...@apache.org>.
amaliujia commented on a change in pull request #14791:
URL: https://github.com/apache/flink/pull/14791#discussion_r569186393



##########
File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/plan/rules/physical/stream/StreamPhysicalPythonGroupWindowAggregateRule.java
##########
@@ -78,11 +78,11 @@ public boolean matches(RelOptRuleCall call) {
                         .anyMatch(x -> PythonUtil.isPythonAggregate(x, PythonFunctionKind.PANDAS));
         boolean existJavaFunction =
                 aggCalls.stream().anyMatch(x -> !PythonUtil.isPythonAggregate(x, null));
+        if (existPandasFunction && existGeneralPythonFunction) {
+            throw new TableException(
+                    "Pandas UDAFs and General Python UDAFs are not supported in used together currently.");

Review comment:
       Question: so Pandas UDAF and General UDAF cannot work together because one input is Row and another is non-row?




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] HuangXingBo commented on a change in pull request #14791: [FLINK-21168][python][table-planner-blink] Add support for general python group window aggregate function in Physical Rule and Node

Posted by GitBox <gi...@apache.org>.
HuangXingBo commented on a change in pull request #14791:
URL: https://github.com/apache/flink/pull/14791#discussion_r569202604



##########
File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/plan/rules/physical/stream/StreamPhysicalPythonGroupWindowAggregateRule.java
##########
@@ -78,11 +78,11 @@ public boolean matches(RelOptRuleCall call) {
                         .anyMatch(x -> PythonUtil.isPythonAggregate(x, PythonFunctionKind.PANDAS));
         boolean existJavaFunction =
                 aggCalls.stream().anyMatch(x -> !PythonUtil.isPythonAggregate(x, null));
+        if (existPandasFunction && existGeneralPythonFunction) {
+            throw new TableException(

Review comment:
       I think the way of throwing exception can better make users know the specific cause of the error. What do you think?
   




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot commented on pull request #14791: [FLINK-21168][python][table-planner-blink] Add support for general python group window aggregate function in Physical Rule and Node

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #14791:
URL: https://github.com/apache/flink/pull/14791#issuecomment-768910856


   Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
   to review your pull request. We will use this comment to track the progress of the review.
   
   
   ## Automated Checks
   Last check on commit 3a234c3d0715f62569393b208f6b858e7a2508fb (Thu Jan 28 09:10:17 UTC 2021)
   
   **Warnings:**
    * No documentation files were touched! Remember to keep the Flink docs up to date!
    * **This pull request references an unassigned [Jira ticket](https://issues.apache.org/jira/browse/FLINK-21168).** According to the [code contribution guide](https://flink.apache.org/contributing/contribute-code.html), tickets need to be assigned before starting with the implementation work.
   
   
   <sub>Mention the bot in a comment to re-run the automated checks.</sub>
   ## Review Progress
   
   * ❓ 1. The [description] looks good.
   * ❓ 2. There is [consensus] that the contribution should go into to Flink.
   * ❓ 3. Needs [attention] from.
   * ❓ 4. The change fits into the overall [architecture].
   * ❓ 5. Overall code [quality] is good.
   
   Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
    The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
    - `@flinkbot approve all` to approve all aspects
    - `@flinkbot approve-until architecture` to approve everything until `architecture`
    - `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
    - `@flinkbot disapprove architecture` to remove an approval you gave earlier
   </details>


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] HuangXingBo commented on pull request #14791: [FLINK-21168][python][table-planner-blink] Add support for general python group window aggregate function in Physical Rule and Node

Posted by GitBox <gi...@apache.org>.
HuangXingBo commented on pull request #14791:
URL: https://github.com/apache/flink/pull/14791#issuecomment-769522291


   @flinkbot run azure


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14791: [FLINK-21168][python][table-planner-blink] Add support for general python group window aggregate function in Physical Rule and Node

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14791:
URL: https://github.com/apache/flink/pull/14791#issuecomment-768926023


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597",
       "triggerID" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "769522291",
       "triggerType" : "MANUAL"
     } ]
   }-->
   ## CI report:
   
   * 3a234c3d0715f62569393b208f6b858e7a2508fb Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14791: [FLINK-21168][python][table-planner-blink] Add support for general python group window aggregate function in Physical Rule and Node

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14791:
URL: https://github.com/apache/flink/pull/14791#issuecomment-768926023


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597",
       "triggerID" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597",
       "triggerID" : "769522291",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "c229b2c09cf62019cc497edb8dd7fc84dc64fc0b",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12900",
       "triggerID" : "c229b2c09cf62019cc497edb8dd7fc84dc64fc0b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * c229b2c09cf62019cc497edb8dd7fc84dc64fc0b Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12900) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14791: [FLINK-21168][python][table-planner-blink] Add support for general python group window aggregate function in Physical Rule and Node

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14791:
URL: https://github.com/apache/flink/pull/14791#issuecomment-768926023


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597",
       "triggerID" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 3a234c3d0715f62569393b208f6b858e7a2508fb Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14791: [FLINK-21168][python][table-planner-blink] Add support for general python group window aggregate function in Physical Rule and Node

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14791:
URL: https://github.com/apache/flink/pull/14791#issuecomment-768926023


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597",
       "triggerID" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597",
       "triggerID" : "769522291",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "c229b2c09cf62019cc497edb8dd7fc84dc64fc0b",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "c229b2c09cf62019cc497edb8dd7fc84dc64fc0b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 3a234c3d0715f62569393b208f6b858e7a2508fb Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597) 
   * c229b2c09cf62019cc497edb8dd7fc84dc64fc0b UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot commented on pull request #14791: [FLINK-21168][python][table-planner-blink] Add support for general python group window aggregate function in Physical Rule and Node

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #14791:
URL: https://github.com/apache/flink/pull/14791#issuecomment-768926023


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 3a234c3d0715f62569393b208f6b858e7a2508fb UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] HuangXingBo closed pull request #14791: [FLINK-21168][python][table-planner-blink] Add support for general python group window aggregate function in Physical Rule and Node

Posted by GitBox <gi...@apache.org>.
HuangXingBo closed pull request #14791:
URL: https://github.com/apache/flink/pull/14791


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] amaliujia commented on a change in pull request #14791: [FLINK-21168][python][table-planner-blink] Add support for general python group window aggregate function in Physical Rule and Node

Posted by GitBox <gi...@apache.org>.
amaliujia commented on a change in pull request #14791:
URL: https://github.com/apache/flink/pull/14791#discussion_r569187223



##########
File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/plan/rules/physical/stream/StreamPhysicalPythonGroupWindowAggregateRule.java
##########
@@ -98,7 +98,12 @@ public RelNode convert(RelNode rel) {
         FlinkLogicalWindowAggregate agg = (FlinkLogicalWindowAggregate) rel;
         LogicalWindow window = agg.getWindow();
 
-        if (window instanceof SessionGroupWindow) {
+        List<AggregateCall> aggCalls = agg.getAggCallList();
+        boolean isPandasPythonUDAF =
+                aggCalls.stream()
+                        .anyMatch(x -> PythonUtil.isPythonAggregate(x, PythonFunctionKind.PANDAS));
+
+        if (isPandasPythonUDAF && window instanceof SessionGroupWindow) {
             throw new TableException("Session Group Window is currently not supported.");

Review comment:
       Nit: probably `"Session Group Window is currently not supported for Pandas UDAF"`.
   
   Also why session window does not work when it is Pandas UDAF?




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] WeiZhong94 commented on a change in pull request #14791: [FLINK-21168][python][table-planner-blink] Add support for general python group window aggregate function in Physical Rule and Node

Posted by GitBox <gi...@apache.org>.
WeiZhong94 commented on a change in pull request #14791:
URL: https://github.com/apache/flink/pull/14791#discussion_r584514927



##########
File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/stream/StreamExecPythonGroupWindowAggregate.java
##########
@@ -161,16 +181,64 @@ public StreamExecPythonGroupWindowAggregate(
         WindowAssigner<?> windowAssigner = windowAssignerAndTrigger.f0;
         Trigger<?> trigger = windowAssignerAndTrigger.f1;
         Configuration config = CommonPythonUtil.getMergedConfig(planner.getExecEnv(), tableConfig);
-        OneInputTransformation<RowData, RowData> transform =
-                createPythonStreamWindowGroupOneInputTransformation(
-                        inputTransform,
-                        inputRowType,
-                        outputRowType,
-                        inputTimeFieldIndex,
-                        windowAssigner,
-                        trigger,
-                        emitStrategy.getAllowLateness(),
-                        config);
+        boolean isGeneralPythonUDAF =
+                Arrays.stream(aggCalls)
+                        .anyMatch(x -> PythonUtil.isPythonAggregate(x, PythonFunctionKind.GENERAL));
+        int[] namePropertyTypeArray =
+                Arrays.stream(namedWindowProperties)
+                        .mapToInt(
+                                p -> {
+                                    PlannerWindowProperty property = p.property();
+                                    if (property instanceof PlannerWindowStart) {
+                                        return 0;

Review comment:
       Using enumerations or directly using case classes to represent the namedProperties looks more readable than using magic numbers.

##########
File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/stream/StreamExecPythonGroupWindowAggregate.java
##########
@@ -343,4 +444,60 @@ public StreamExecPythonGroupWindowAggregate(
                     e);
         }
     }
+
+    @SuppressWarnings({"unchecked", "rawtypes"})
+    private OneInputStreamOperator<RowData, RowData>
+            getGeneralPythonStreamGroupWindowAggregateFunctionOperator(

Review comment:
       It seems we still need to support `allowLateness` in the GeneralPythonStreamGroupWindowAggregateFunctionOperator in order to align with java window.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14791: [FLINK-21168][python][table-planner-blink] Add support for general python group window aggregate function in Physical Rule and Node

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14791:
URL: https://github.com/apache/flink/pull/14791#issuecomment-768926023


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597",
       "triggerID" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597",
       "triggerID" : "769522291",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "c229b2c09cf62019cc497edb8dd7fc84dc64fc0b",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12900",
       "triggerID" : "c229b2c09cf62019cc497edb8dd7fc84dc64fc0b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "192b64ca6ae0f6fac76ab644e2ef4a5b043503d1",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "192b64ca6ae0f6fac76ab644e2ef4a5b043503d1",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * c229b2c09cf62019cc497edb8dd7fc84dc64fc0b Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12900) 
   * 192b64ca6ae0f6fac76ab644e2ef4a5b043503d1 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14791: [FLINK-21168][python][table-planner-blink] Add support for general python group window aggregate function in Physical Rule and Node

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14791:
URL: https://github.com/apache/flink/pull/14791#issuecomment-768926023


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597",
       "triggerID" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597",
       "triggerID" : "769522291",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "c229b2c09cf62019cc497edb8dd7fc84dc64fc0b",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12900",
       "triggerID" : "c229b2c09cf62019cc497edb8dd7fc84dc64fc0b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * c229b2c09cf62019cc497edb8dd7fc84dc64fc0b Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12900) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14791: [FLINK-21168][python][table-planner-blink] Add support for general python group window aggregate function in Physical Rule and Node

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14791:
URL: https://github.com/apache/flink/pull/14791#issuecomment-768926023


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597",
       "triggerID" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597",
       "triggerID" : "769522291",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "c229b2c09cf62019cc497edb8dd7fc84dc64fc0b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12900",
       "triggerID" : "c229b2c09cf62019cc497edb8dd7fc84dc64fc0b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "192b64ca6ae0f6fac76ab644e2ef4a5b043503d1",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13691",
       "triggerID" : "192b64ca6ae0f6fac76ab644e2ef4a5b043503d1",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 192b64ca6ae0f6fac76ab644e2ef4a5b043503d1 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13691) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] amaliujia commented on a change in pull request #14791: [FLINK-21168][python][table-planner-blink] Add support for general python group window aggregate function in Physical Rule and Node

Posted by GitBox <gi...@apache.org>.
amaliujia commented on a change in pull request #14791:
URL: https://github.com/apache/flink/pull/14791#discussion_r569671573



##########
File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/plan/rules/physical/stream/StreamPhysicalPythonGroupWindowAggregateRule.java
##########
@@ -78,11 +78,11 @@ public boolean matches(RelOptRuleCall call) {
                         .anyMatch(x -> PythonUtil.isPythonAggregate(x, PythonFunctionKind.PANDAS));
         boolean existJavaFunction =
                 aggCalls.stream().anyMatch(x -> !PythonUtil.isPythonAggregate(x, null));
+        if (existPandasFunction && existGeneralPythonFunction) {
+            throw new TableException(

Review comment:
       I see. 
   
   This is ok as this is a relatively easy place to throw exception. I feel like conceptually the better place is in the validator but that might be too much work. 




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] HuangXingBo commented on pull request #14791: [FLINK-21168][python][table-planner-blink] Add support for general python group window aggregate function in Physical Rule and Node

Posted by GitBox <gi...@apache.org>.
HuangXingBo commented on pull request #14791:
URL: https://github.com/apache/flink/pull/14791#issuecomment-788739420


   The failed test has been reported in [FLINK-17510](https://issues.apache.org/jira/browse/FLINK-17510) which is not relevant to this PR. I will merge the PR first.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] HuangXingBo commented on a change in pull request #14791: [FLINK-21168][python][table-planner-blink] Add support for general python group window aggregate function in Physical Rule and Node

Posted by GitBox <gi...@apache.org>.
HuangXingBo commented on a change in pull request #14791:
URL: https://github.com/apache/flink/pull/14791#discussion_r584674087



##########
File path: flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/stream/StreamExecPythonGroupWindowAggregate.java
##########
@@ -161,16 +181,64 @@ public StreamExecPythonGroupWindowAggregate(
         WindowAssigner<?> windowAssigner = windowAssignerAndTrigger.f0;
         Trigger<?> trigger = windowAssignerAndTrigger.f1;
         Configuration config = CommonPythonUtil.getMergedConfig(planner.getExecEnv(), tableConfig);
-        OneInputTransformation<RowData, RowData> transform =
-                createPythonStreamWindowGroupOneInputTransformation(
-                        inputTransform,
-                        inputRowType,
-                        outputRowType,
-                        inputTimeFieldIndex,
-                        windowAssigner,
-                        trigger,
-                        emitStrategy.getAllowLateness(),
-                        config);
+        boolean isGeneralPythonUDAF =
+                Arrays.stream(aggCalls)
+                        .anyMatch(x -> PythonUtil.isPythonAggregate(x, PythonFunctionKind.GENERAL));
+        int[] namePropertyTypeArray =
+                Arrays.stream(namedWindowProperties)
+                        .mapToInt(
+                                p -> {
+                                    PlannerWindowProperty property = p.property();
+                                    if (property instanceof PlannerWindowStart) {
+                                        return 0;

Review comment:
       Yes. Directly using case classes maybe a better solution.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14791: [FLINK-21168][python][table-planner-blink] Add support for general python group window aggregate function in Physical Rule and Node

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14791:
URL: https://github.com/apache/flink/pull/14791#issuecomment-768926023


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597",
       "triggerID" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 3a234c3d0715f62569393b208f6b858e7a2508fb Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14791: [FLINK-21168][python][table-planner-blink] Add support for general python group window aggregate function in Physical Rule and Node

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14791:
URL: https://github.com/apache/flink/pull/14791#issuecomment-768926023


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597",
       "triggerID" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "3a234c3d0715f62569393b208f6b858e7a2508fb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12597",
       "triggerID" : "769522291",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "c229b2c09cf62019cc497edb8dd7fc84dc64fc0b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12900",
       "triggerID" : "c229b2c09cf62019cc497edb8dd7fc84dc64fc0b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "192b64ca6ae0f6fac76ab644e2ef4a5b043503d1",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13691",
       "triggerID" : "192b64ca6ae0f6fac76ab644e2ef4a5b043503d1",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6812a3558513535d3f9adf2e2eca4c951b31a34c",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13949",
       "triggerID" : "6812a3558513535d3f9adf2e2eca4c951b31a34c",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f8a7a7bb160d9db1c23557eb2a112ed018b94d52",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13961",
       "triggerID" : "f8a7a7bb160d9db1c23557eb2a112ed018b94d52",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 6812a3558513535d3f9adf2e2eca4c951b31a34c Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13949) 
   * f8a7a7bb160d9db1c23557eb2a112ed018b94d52 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13961) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org