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/09/02 11:01:00 UTC

[GitHub] [flink] dianfu opened a new pull request #13304: [FLINK-19118][python] Support Expression in the operations of Python Table API

dianfu opened a new pull request #13304:
URL: https://github.com/apache/flink/pull/13304


   
   ## What is the purpose of the change
   
   *This pull request support Expression in the operations of Python Table API*
   
   ## Brief change log
   
     - *Update the operations in Table to allow both string and Expression arguments*
   
   ## Verifying this change
    
     - Have updated the existing tests to use Expression.
   
   ## 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? (yes)
     - If yes, how is the feature documented? (Will add documentation in a separate PR)
   


----------------------------------------------------------------
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 #13304: [FLINK-19118][python] Support Expression in the operations of Python Table API

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d308fe842311e794be70b21c1f9335c93fb29b5b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6096",
       "triggerID" : "d308fe842311e794be70b21c1f9335c93fb29b5b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8ad8edefaaa28a0459b40b3587013d9ca7c14933",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6131",
       "triggerID" : "8ad8edefaaa28a0459b40b3587013d9ca7c14933",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 8ad8edefaaa28a0459b40b3587013d9ca7c14933 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6131) 
   
   <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 #13304: [FLINK-19118][python] Support Expression in the operations of Python Table API

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d308fe842311e794be70b21c1f9335c93fb29b5b",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6096",
       "triggerID" : "d308fe842311e794be70b21c1f9335c93fb29b5b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * d308fe842311e794be70b21c1f9335c93fb29b5b Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6096) 
   
   <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 #13304: [FLINK-19118][python] Support Expression in the operations of Python Table API

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d308fe842311e794be70b21c1f9335c93fb29b5b",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "d308fe842311e794be70b21c1f9335c93fb29b5b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * d308fe842311e794be70b21c1f9335c93fb29b5b 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] dianfu commented on pull request #13304: [FLINK-19118][python] Support Expression in the operations of Python Table API

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


   @sunjincheng121 Thanks for the review. Updated the PR.


----------------------------------------------------------------
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 #13304: [FLINK-19118][python] Support Expression in the operations of Python Table API

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


   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 d308fe842311e794be70b21c1f9335c93fb29b5b (Wed Sep 02 11:02:40 UTC 2020)
   
   **Warnings:**
    * No documentation files were touched! Remember to keep the Flink docs up to date!
   
   
   <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] flinkbot edited a comment on pull request #13304: [FLINK-19118][python] Support Expression in the operations of Python Table API

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d308fe842311e794be70b21c1f9335c93fb29b5b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6096",
       "triggerID" : "d308fe842311e794be70b21c1f9335c93fb29b5b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8ad8edefaaa28a0459b40b3587013d9ca7c14933",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6131",
       "triggerID" : "8ad8edefaaa28a0459b40b3587013d9ca7c14933",
       "triggerType" : "PUSH"
     }, {
       "hash" : "83acd696081b6640843fca45874693201aafe13d",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6146",
       "triggerID" : "83acd696081b6640843fca45874693201aafe13d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 83acd696081b6640843fca45874693201aafe13d Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6146) 
   
   <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 #13304: [FLINK-19118][python] Support Expression in the operations of Python Table API

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d308fe842311e794be70b21c1f9335c93fb29b5b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6096",
       "triggerID" : "d308fe842311e794be70b21c1f9335c93fb29b5b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8ad8edefaaa28a0459b40b3587013d9ca7c14933",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6131",
       "triggerID" : "8ad8edefaaa28a0459b40b3587013d9ca7c14933",
       "triggerType" : "PUSH"
     }, {
       "hash" : "83acd696081b6640843fca45874693201aafe13d",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "83acd696081b6640843fca45874693201aafe13d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 8ad8edefaaa28a0459b40b3587013d9ca7c14933 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6131) 
   * 83acd696081b6640843fca45874693201aafe13d 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] dianfu commented on a change in pull request #13304: [FLINK-19118][python] Support Expression in the operations of Python Table API

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



##########
File path: flink-python/pyflink/table/tests/test_correlate.py
##########
@@ -39,7 +40,8 @@ def test_join_lateral_with_join_predicate(self):
                                                     "org.apache.flink.table.utils.TableFunc1")
         source = t_env.from_elements([("1", "1#3#5#7"), ("2", "2#4#6#8")], ["id", "words"])
 
-        result = source.join_lateral("split(words) as (word)", "id = word")
+        result = source.join_lateral(E.call('split', source.words).alias('word'),
+                                     E.col('id') == E.col('word'))

Review comment:
       **word** is not from the **source** table and so we could not do that.




----------------------------------------------------------------
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] sunjincheng121 commented on a change in pull request #13304: [FLINK-19118][python] Support Expression in the operations of Python Table API

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



##########
File path: flink-python/pyflink/table/tests/test_column_operation.py
##########
@@ -16,36 +16,37 @@
 # limitations under the License.
 ################################################################################
 
+from pyflink.table import expressions as E
 from pyflink.testing.test_case_utils import PyFlinkStreamTableTestCase
 
 
 class StreamTableColumnsOperationTests(PyFlinkStreamTableTestCase):
 
     def test_add_columns(self):
         t = self.t_env.from_elements([(1, 'Hi', 'Hello')], ['a', 'b', 'c'])
-        result = t.select("a").add_columns("a + 1 as b, a + 2 as c")
+        result = t.select(t.a).add_columns((t.a + 1).alias('b'), (t.a + 2).alias('c'))
         query_operation = result._j_table.getQueryOperation()
         self.assertEqual('[a, plus(a, 1), '
                          'plus(a, 2)]',
                          query_operation.getProjectList().toString())
 
     def test_add_or_replace_columns(self):
         t = self.t_env.from_elements([(1, 'Hi', 'Hello')], ['a', 'b', 'c'])
-        result = t.select("a").add_or_replace_columns("a + 1 as b, a + 2 as a")
+        result = t.select("a").add_or_replace_columns((t.a + 1).alias('b'), (t.a + 2).alias('a'))
         query_operation = result._j_table.getQueryOperation()
         self.assertEqual('[plus(a, 2), '
                          'plus(a, 1)]',
                          query_operation.getProjectList().toString())
 
     def test_rename_columns(self):
         t = self.t_env.from_elements([(1, 'Hi', 'Hello')], ['a', 'b', 'c'])
-        result = t.select("a, b, c").rename_columns("a as d, c as f, b as e")
+        result = t.select("a, b, c").rename_columns(t.a.alias('d'), t.c.alias('f'), t.b.alias('e'))
         table_schema = result._j_table.getQueryOperation().getTableSchema()
         self.assertEqual(['d', 'e', 'f'], list(table_schema.getFieldNames()))
 
     def test_drop_columns(self):
         t = self.t_env.from_elements([(1, 'Hi', 'Hello')], ['a', 'b', 'c'])
-        result = t.select("a, b, c").drop_columns("a, c")
+        result = t.select("a, b, c").drop_columns(E.col('a'), E.col('c'))

Review comment:
       `t.select("a, b, c")` -> `t.select(t.a, t.b, t.c)`
   
   `E.col('a')` -> `t.a`?

##########
File path: flink-python/pyflink/table/examples/batch/word_count.py
##########
@@ -23,6 +23,7 @@
 
 from pyflink.dataset import ExecutionEnvironment
 from pyflink.table import BatchTableEnvironment, TableConfig
+from pyflink.table import expressions as E

Review comment:
       How about  `E` -> `expr`(Shorthand in lowercase)? some as pandas did?  e.g.: `import numpy as np`
   
   https://github.com/pandas-dev/pandas/blob/master/pandas/tests/dtypes/test_dtypes.py

##########
File path: flink-python/pyflink/table/tests/test_correlate.py
##########
@@ -39,7 +40,8 @@ def test_join_lateral_with_join_predicate(self):
                                                     "org.apache.flink.table.utils.TableFunc1")
         source = t_env.from_elements([("1", "1#3#5#7"), ("2", "2#4#6#8")], ["id", "words"])
 
-        result = source.join_lateral("split(words) as (word)", "id = word")
+        result = source.join_lateral(E.call('split', source.words).alias('word'),
+                                     E.col('id') == E.col('word'))

Review comment:
       `E.col('id') == E.col('word')` -> `source.id == source.word`

##########
File path: flink-python/pyflink/table/tests/test_dependency.py
##########
@@ -112,7 +113,7 @@ def check_requirements(i):
             ['a', 'b'], [DataTypes.BIGINT(), DataTypes.BIGINT()])
         self.t_env.register_table_sink("Results", table_sink)
         t = self.t_env.from_elements([(1, 2), (2, 5), (3, 1)], ['a', 'b'])
-        exec_insert_table(t.select("check_requirements(a), a"), "Results")
+        exec_insert_table(t.select(E.call('check_requirements', E.col('a')), E.col('a')), "Results")

Review comment:
       `E.col('a')` -> `t.a` 

##########
File path: flink-python/pyflink/table/tests/test_calc.py
##########
@@ -31,21 +32,21 @@ class StreamTableCalcTests(PyFlinkStreamTableTestCase):
 
     def test_select(self):
         t = self.t_env.from_elements([(1, 'hi', 'hello')], ['a', 'b', 'c'])
-        result = t.select("a + 1, b, c")
+        result = t.select(t.a + 1, t.b, t.c)
         query_operation = result._j_table.getQueryOperation()
         self.assertEqual('[plus(a, 1), b, c]',
                          query_operation.getProjectList().toString())
 
     def test_alias(self):
         t = self.t_env.from_elements([(1, 'Hi', 'Hello')], ['a', 'b', 'c'])
-        result = t.alias("d, e, f").select("d, e, f")
+        result = t.alias("d, e, f").select(E.col('d'), E.col('e'), E.col('f'))

Review comment:
       How about do a little bit change as follows?:
   ```
    t2 = t.alias("d, e, f")
    result = t2.select(t2.d, t2.e, t2.f)
   ```




----------------------------------------------------------------
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] dianfu commented on pull request #13304: [FLINK-19118][python] Support Expression in the operations of Python Table API

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


   @WeiZhong94 Thanks for the review. Updated the PR.


----------------------------------------------------------------
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] sunjincheng121 commented on pull request #13304: [FLINK-19118][python] Support Expression in the operations of Python Table API

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


   @flinkbot approve all


----------------------------------------------------------------
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 #13304: [FLINK-19118][python] Support Expression in the operations of Python Table API

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d308fe842311e794be70b21c1f9335c93fb29b5b",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6096",
       "triggerID" : "d308fe842311e794be70b21c1f9335c93fb29b5b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8ad8edefaaa28a0459b40b3587013d9ca7c14933",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "8ad8edefaaa28a0459b40b3587013d9ca7c14933",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * d308fe842311e794be70b21c1f9335c93fb29b5b Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6096) 
   * 8ad8edefaaa28a0459b40b3587013d9ca7c14933 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 #13304: [FLINK-19118][python] Support Expression in the operations of Python Table API

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d308fe842311e794be70b21c1f9335c93fb29b5b",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6096",
       "triggerID" : "d308fe842311e794be70b21c1f9335c93fb29b5b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8ad8edefaaa28a0459b40b3587013d9ca7c14933",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6131",
       "triggerID" : "8ad8edefaaa28a0459b40b3587013d9ca7c14933",
       "triggerType" : "PUSH"
     }, {
       "hash" : "83acd696081b6640843fca45874693201aafe13d",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6146",
       "triggerID" : "83acd696081b6640843fca45874693201aafe13d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 8ad8edefaaa28a0459b40b3587013d9ca7c14933 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6131) 
   * 83acd696081b6640843fca45874693201aafe13d Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6146) 
   
   <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] WeiZhong94 commented on a change in pull request #13304: [FLINK-19118][python] Support Expression in the operations of Python Table API

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



##########
File path: flink-python/pyflink/table/tests/test_window.py
##########
@@ -40,8 +41,8 @@ class BatchTableWindowTests(PyFlinkBatchTableTestCase):
 
     def test_tumble_window(self):
         t = self.t_env.from_elements([(1, 1, "Hello")], ["a", "b", "c"])
-        result = t.window(Tumble.over("2.rows").on("a").alias("w"))\
-            .group_by("w, c").select("b.sum")
+        result = t.window(Tumble.over(E.lit(2).rows).on("a").alias("w"))\

Review comment:
       ".rows" seems not supported. Maybe we should support it or use "row_interval()" instead?

##########
File path: flink-python/pyflink/table/tests/test_pandas_udf.py
##########
@@ -58,8 +59,8 @@ def test_basic_functionality(self):
 
         t = self.t_env.from_elements([(1, 2, 3), (2, 5, 6), (3, 1, 9)], ['a', 'b', 'c'])
         exec_insert_table(
-            t.where("add_one(b) <= 3").select("a, b + 1, add(a + 1, subtract_one(c)) + 2, "
-                                              "add(add_one(a), 1L)"),
+            t.where(E.call('add_one', t.b) <= 3)
+             .select("a, b + 1, add(a + 1, subtract_one(c)) + 2, " "add(add_one(a), 1L)"),

Review comment:
       combine to one string?




----------------------------------------------------------------
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 #13304: [FLINK-19118][python] Support Expression in the operations of Python Table API

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d308fe842311e794be70b21c1f9335c93fb29b5b",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6096",
       "triggerID" : "d308fe842311e794be70b21c1f9335c93fb29b5b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * d308fe842311e794be70b21c1f9335c93fb29b5b Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6096) 
   
   <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 #13304: [FLINK-19118][python] Support Expression in the operations of Python Table API

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "d308fe842311e794be70b21c1f9335c93fb29b5b",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6096",
       "triggerID" : "d308fe842311e794be70b21c1f9335c93fb29b5b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8ad8edefaaa28a0459b40b3587013d9ca7c14933",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6131",
       "triggerID" : "8ad8edefaaa28a0459b40b3587013d9ca7c14933",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * d308fe842311e794be70b21c1f9335c93fb29b5b Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6096) 
   * 8ad8edefaaa28a0459b40b3587013d9ca7c14933 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6131) 
   
   <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] sunjincheng121 commented on a change in pull request #13304: [FLINK-19118][python] Support Expression in the operations of Python Table API

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



##########
File path: flink-python/pyflink/table/tests/test_correlate.py
##########
@@ -39,7 +40,8 @@ def test_join_lateral_with_join_predicate(self):
                                                     "org.apache.flink.table.utils.TableFunc1")
         source = t_env.from_elements([("1", "1#3#5#7"), ("2", "2#4#6#8")], ["id", "words"])
 
-        result = source.join_lateral("split(words) as (word)", "id = word")
+        result = source.join_lateral(E.call('split', source.words).alias('word'),
+                                     E.col('id') == E.col('word'))

Review comment:
       Yes, I see.




----------------------------------------------------------------
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] sunjincheng121 merged pull request #13304: [FLINK-19118][python] Support Expression in the operations of Python Table API

Posted by GitBox <gi...@apache.org>.
sunjincheng121 merged pull request #13304:
URL: https://github.com/apache/flink/pull/13304


   


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