This is an automated email from the ASF dual-hosted git repository. dianfu pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/master by this push: new 72798a76228 [hotfix][python][docs] Fix broken syntax in Flink Table API query example 72798a76228 is described below commit 72798a7622830d3052cb6945239dd03e19a754af Author: Deepyaman Datta <deepyaman.da...@utexas.edu> AuthorDate: Fri Jul 21 13:22:54 2023 -0500 [hotfix][python][docs] Fix broken syntax in Flink Table API query example This closes #23043. --- docs/content.zh/docs/dev/python/table/intro_to_table_api.md | 4 ++-- docs/content/docs/dev/python/table/intro_to_table_api.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/content.zh/docs/dev/python/table/intro_to_table_api.md b/docs/content.zh/docs/dev/python/table/intro_to_table_api.md index dd08f67402b..98a689d0a0a 100644 --- a/docs/content.zh/docs/dev/python/table/intro_to_table_api.md +++ b/docs/content.zh/docs/dev/python/table/intro_to_table_api.md @@ -322,7 +322,7 @@ new_table.execute().print() ```python from pyflink.table import EnvironmentSettings, TableEnvironment -from pyflink.table.expressions import col +from pyflink.table.expressions import call, col # 通过 batch table environment 来执行查询 env_settings = EnvironmentSettings.in_batch_mode() @@ -336,7 +336,7 @@ revenue = orders \ .select(col("name"), col("country"), col("revenue")) \ .where(col("country") == 'FRANCE') \ .group_by(col("name")) \ - .select(col("name"), col("country").sum.alias('rev_sum')) + .select(col("name"), call("sum", col("revenue")).alias('rev_sum')) revenue.execute().print() ``` diff --git a/docs/content/docs/dev/python/table/intro_to_table_api.md b/docs/content/docs/dev/python/table/intro_to_table_api.md index ce540a68610..43e657514f1 100644 --- a/docs/content/docs/dev/python/table/intro_to_table_api.md +++ b/docs/content/docs/dev/python/table/intro_to_table_api.md @@ -323,7 +323,7 @@ The following example shows a simple Table API aggregation query: ```python from pyflink.table import EnvironmentSettings, TableEnvironment -from pyflink.table.expressions import col +from pyflink.table.expressions import call, col # using batch table environment to execute the queries env_settings = EnvironmentSettings.in_batch_mode() @@ -337,7 +337,7 @@ revenue = orders \ .select(col("name"), col("country"), col("revenue")) \ .where(col("country") == 'FRANCE') \ .group_by(col("name")) \ - .select(col("name"), col("country").sum.alias('rev_sum')) + .select(col("name"), call("sum", col("revenue")).alias('rev_sum')) revenue.execute().print() ```