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() ```