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 2020/01/20 03:11:19 UTC

[GitHub] [flink] hequn8128 opened a new pull request #10907: [FLINK-15675][python] Add exception and documentation that Python UDF is not supported for Flink Planner under batch mode

hequn8128 opened a new pull request #10907: [FLINK-15675][python] Add exception and documentation that Python UDF is not supported for Flink Planner under batch mode
URL: https://github.com/apache/flink/pull/10907
 
 
   
   ## What is the purpose of the change
   
   This pull request adds straightforward exceptions and document to info users that Python UDF is not supported for Flink Planner under batch mode.
   
   
   ## Brief change log
   
     - Throw exceptions when registering Python UDFs under flink planner batch mode.
     - Add document to info users that Python UDF is not supported for Flink Planner under batch mode.
   
   
   ## Verifying this change
   
   This change added tests and can be verified as follows:
   
     - Add test_udf.test_invalid_register_udf to test exception has been thrown.
   
   ## 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, Yarn/Mesos, 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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] hequn8128 commented on issue #10907: [FLINK-15675][python] Add exception and documentation that Python UDF is not supported for Flink Planner under batch mode

Posted by GitBox <gi...@apache.org>.
hequn8128 commented on issue #10907: [FLINK-15675][python] Add exception and documentation that Python UDF is not supported for Flink Planner under batch mode
URL: https://github.com/apache/flink/pull/10907#issuecomment-576093239
 
 
   @dianfu Thanks a lot for your advice. The PR has been updated according to your suggestions.

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


With regards,
Apache Git Services

[GitHub] [flink] dianfu closed pull request #10907: [FLINK-15675][python] Add exception and documentation that Python UDF is not supported for Flink Planner under batch mode

Posted by GitBox <gi...@apache.org>.
dianfu closed pull request #10907: [FLINK-15675][python] Add exception and documentation that Python UDF is not supported for Flink Planner under batch mode
URL: https://github.com/apache/flink/pull/10907
 
 
   

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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10907: [FLINK-15675][python] Add exception and documentation that Python UDF is not supported for Flink Planner under batch mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10907: [FLINK-15675][python] Add exception and documentation that Python UDF is not supported for Flink Planner under batch mode
URL: https://github.com/apache/flink/pull/10907#issuecomment-576095974
 
 
   <!--
   Meta data
   Hash:39886b65234607cf6f03a088f482b3ca83e0b36e Status:PENDING URL:https://travis-ci.com/flink-ci/flink/builds/145155700 TriggerType:PUSH TriggerID:39886b65234607cf6f03a088f482b3ca83e0b36e
   Hash:39886b65234607cf6f03a088f482b3ca83e0b36e Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4491 TriggerType:PUSH TriggerID:39886b65234607cf6f03a088f482b3ca83e0b36e
   -->
   ## CI report:
   
   * 39886b65234607cf6f03a088f482b3ca83e0b36e Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/145155700) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4491) 
   
   <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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10907: [FLINK-15675][python] Add exception and documentation that Python UDF is not supported for Flink Planner under batch mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10907: [FLINK-15675][python] Add exception and documentation that Python UDF is not supported for Flink Planner under batch mode
URL: https://github.com/apache/flink/pull/10907#issuecomment-576095974
 
 
   <!--
   Meta data
   Hash:39886b65234607cf6f03a088f482b3ca83e0b36e Status:PENDING URL:https://travis-ci.com/flink-ci/flink/builds/145155700 TriggerType:PUSH TriggerID:39886b65234607cf6f03a088f482b3ca83e0b36e
   Hash:39886b65234607cf6f03a088f482b3ca83e0b36e Status:PENDING URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4491 TriggerType:PUSH TriggerID:39886b65234607cf6f03a088f482b3ca83e0b36e
   -->
   ## CI report:
   
   * 39886b65234607cf6f03a088f482b3ca83e0b36e Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/145155700) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4491) 
   
   <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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot commented on issue #10907: [FLINK-15675][python] Add exception and documentation that Python UDF is not supported for Flink Planner under batch mode

Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #10907: [FLINK-15675][python] Add exception and documentation that Python UDF is not supported for Flink Planner under batch mode
URL: https://github.com/apache/flink/pull/10907#issuecomment-576089196
 
 
   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 57f3a51f43d0d0d4c4ac9268763cc4a89c304f5e (Mon Jan 20 03:13:43 UTC 2020)
   
    ✅no warnings
   
   <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


With regards,
Apache Git Services

[GitHub] [flink] dianfu commented on a change in pull request #10907: [FLINK-15675][python] Add exception and documentation that Python UDF is not supported for Flink Planner under batch mode

Posted by GitBox <gi...@apache.org>.
dianfu commented on a change in pull request #10907: [FLINK-15675][python] Add exception and documentation that Python UDF is not supported for Flink Planner under batch mode
URL: https://github.com/apache/flink/pull/10907#discussion_r368357160
 
 

 ##########
 File path: docs/dev/table/functions/udfs.md
 ##########
 @@ -144,6 +144,8 @@ $ python --version
 $ python -m pip install apache-beam==2.15.0
 {% endhighlight %}
 
+<span class="label label-info">Note</span> Currently, Python UDF is supported for Blink planner both under streaming and batch mode while is only supported under streaming mode for Flink Planner.
 
 Review comment:
   Flink Planner -> Old Planner

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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot commented on issue #10907: [FLINK-15675][python] Add exception and documentation that Python UDF is not supported for Flink Planner under batch mode

Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #10907: [FLINK-15675][python] Add exception and documentation that Python UDF is not supported for Flink Planner under batch mode
URL: https://github.com/apache/flink/pull/10907#issuecomment-576095974
 
 
   <!--
   Meta data
   Hash:39886b65234607cf6f03a088f482b3ca83e0b36e Status:UNKNOWN URL:TBD TriggerType:PUSH TriggerID:39886b65234607cf6f03a088f482b3ca83e0b36e
   -->
   ## CI report:
   
   * 39886b65234607cf6f03a088f482b3ca83e0b36e 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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #10907: [FLINK-15675][python] Add exception and documentation that Python UDF is not supported for Flink Planner under batch mode

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #10907: [FLINK-15675][python] Add exception and documentation that Python UDF is not supported for Flink Planner under batch mode
URL: https://github.com/apache/flink/pull/10907#issuecomment-576095974
 
 
   <!--
   Meta data
   Hash:39886b65234607cf6f03a088f482b3ca83e0b36e Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/145155700 TriggerType:PUSH TriggerID:39886b65234607cf6f03a088f482b3ca83e0b36e
   Hash:39886b65234607cf6f03a088f482b3ca83e0b36e Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4491 TriggerType:PUSH TriggerID:39886b65234607cf6f03a088f482b3ca83e0b36e
   -->
   ## CI report:
   
   * 39886b65234607cf6f03a088f482b3ca83e0b36e Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/145155700) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4491) 
   
   <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


With regards,
Apache Git Services

[GitHub] [flink] dianfu commented on issue #10907: [FLINK-15675][python] Add exception and documentation that Python UDF is not supported for Flink Planner under batch mode

Posted by GitBox <gi...@apache.org>.
dianfu commented on issue #10907: [FLINK-15675][python] Add exception and documentation that Python UDF is not supported for Flink Planner under batch mode
URL: https://github.com/apache/flink/pull/10907#issuecomment-576094047
 
 
   @hequn8128 Thanks for the update. LGTM. Merging...

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


With regards,
Apache Git Services

[GitHub] [flink] dianfu commented on a change in pull request #10907: [FLINK-15675][python] Add exception and documentation that Python UDF is not supported for Flink Planner under batch mode

Posted by GitBox <gi...@apache.org>.
dianfu commented on a change in pull request #10907: [FLINK-15675][python] Add exception and documentation that Python UDF is not supported for Flink Planner under batch mode
URL: https://github.com/apache/flink/pull/10907#discussion_r368357419
 
 

 ##########
 File path: flink-python/pyflink/table/table_environment.py
 ##########
 @@ -743,6 +743,8 @@ def register_function(self, name, function):
         :param function: The python user-defined function to register.
         :type function: pyflink.table.udf.UserDefinedFunctionWrapper
         """
+        if not self._is_blink_planner and isinstance(self, BatchTableEnvironment):
+            raise Exception("Python UDF is not supported for Flink Planner under batch mode!")
 
 Review comment:
   ditto

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


With regards,
Apache Git Services

[GitHub] [flink] dianfu commented on a change in pull request #10907: [FLINK-15675][python] Add exception and documentation that Python UDF is not supported for Flink Planner under batch mode

Posted by GitBox <gi...@apache.org>.
dianfu commented on a change in pull request #10907: [FLINK-15675][python] Add exception and documentation that Python UDF is not supported for Flink Planner under batch mode
URL: https://github.com/apache/flink/pull/10907#discussion_r368357399
 
 

 ##########
 File path: docs/dev/table/functions/udfs.zh.md
 ##########
 @@ -144,6 +144,8 @@ $ python --version
 $ python -m pip install apache-beam==2.15.0
 {% endhighlight %}
 
+<span class="label label-info">Note</span> Currently, Python UDF is supported for Blink planner both under streaming and batch mode while is only supported under streaming mode for Flink Planner.
 
 Review comment:
   ditto

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


With regards,
Apache Git Services