You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Huang Xingbo (Jira)" <ji...@apache.org> on 2020/12/07 07:34:00 UTC
[jira] [Updated] (FLINK-20506) Support FlatMap Operation in Python
Table API
[ https://issues.apache.org/jira/browse/FLINK-20506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Huang Xingbo updated FLINK-20506:
---------------------------------
Description:
Support Python UDTF for FlatMap Operation in Python Table API
The usage:
{code:java}
t = ... # type: Table, table schema: [a: String, b: Int, c: Int]
# flat_map Python UDTF
flat_map_func = udtf(lambda x: for i in range(x): yield Row(i + 1, i * i),
result_types=[DataTypes.INT(), DataTypes.INT()]
t.flat_map(flat_map_func(t.b)).alias("a", "b"){code}
was:
Support Python UDTF for FlatMap Operation in Python Table API
The usage:
{code}
t = ... # type: Table, table schema: [a: String, b: Int, c: Int]
# map General Python UDF
flat_map_func = udtf(lambda x: for i in range(x): yield Row(i + 1, i * i),
result_types=[DataTypes.INT(), DataTypes.INT()]
t.flat_map(flat_map_func(t.b)).alias("a", "b"){code}
> Support FlatMap Operation in Python Table API
> ---------------------------------------------
>
> Key: FLINK-20506
> URL: https://issues.apache.org/jira/browse/FLINK-20506
> Project: Flink
> Issue Type: Sub-task
> Components: API / Python
> Reporter: Huang Xingbo
> Priority: Major
> Fix For: 1.13.0
>
>
> Support Python UDTF for FlatMap Operation in Python Table API
> The usage:
> {code:java}
> t = ... # type: Table, table schema: [a: String, b: Int, c: Int]
> # flat_map Python UDTF
> flat_map_func = udtf(lambda x: for i in range(x): yield Row(i + 1, i * i),
> result_types=[DataTypes.INT(), DataTypes.INT()]
> t.flat_map(flat_map_func(t.b)).alias("a", "b"){code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)