[hotfix][python][docs] Fix broken syntax in Flink Table API query example

This closes #23043.
pull/23774/head
Deepyaman Datta 2 years ago committed by Dian Fu
parent 7f2818bea1
commit 72798a7622

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

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

Loading…
Cancel
Save