[ 
https://issues.apache.org/jira/browse/SPARK-50133?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Xinrong Meng updated SPARK-50133:
---------------------------------
    Description: 
We want to implement a function df.table_argument() (the name can be discussed 
further), which returns a Column object. This Column can then be passed as 
input to call a User-Defined Table Function (UDTF). For example:

 

{{@udtf(returnType="a: int")}}
{{class TestUDTF:}}
{{    def eval(self, row: Row):}}
{{        if row[0] > 5:}}
{{            yield row[0]}}

{{TestUDTF(df.table_agument())}}

 

The df.table_argument() function might also take additional parameters, such as:
 * partition_by: Specifies how the data should be partitioned for processing.
 * order_by: Defines the order within each partition.

 

> Support conversion to table argument
> ------------------------------------
>
>                 Key: SPARK-50133
>                 URL: https://issues.apache.org/jira/browse/SPARK-50133
>             Project: Spark
>          Issue Type: Sub-task
>          Components: PySpark, SQL
>    Affects Versions: 4.0.0
>            Reporter: Takuya Ueshin
>            Priority: Major
>
> We want to implement a function df.table_argument() (the name can be 
> discussed further), which returns a Column object. This Column can then be 
> passed as input to call a User-Defined Table Function (UDTF). For example:
>  
> {{@udtf(returnType="a: int")}}
> {{class TestUDTF:}}
> {{    def eval(self, row: Row):}}
> {{        if row[0] > 5:}}
> {{            yield row[0]}}
> {{TestUDTF(df.table_agument())}}
>  
> The df.table_argument() function might also take additional parameters, such 
> as:
>  * partition_by: Specifies how the data should be partitioned for processing.
>  * order_by: Defines the order within each partition.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to