hsrain3 commented on PR #29234:
URL: https://github.com/apache/flink/pull/29234#issuecomment-5749622870
> Another problem worth to address: this change introduces the public
`pf.udtf` declaration, but `pyflink.dataframe.sql` still recognizes only
`_DataFrameUDFWrapper`:
>
> * `_BINDABLE_TYPES` excludes `_DataFrameUDTFWrapper`;
> * `_get_udfs()` does not collect UDTF declarations;
> * function registration assumes the scalar-UDF-specific
`_table_udf_wrapper`.
>
> As a result, explicit binding currently fails before SQL planning:
>
> ```python
> source = pf.from_dict({"text": ["ab"]})
>
> @pf.udtf(return_dtype=str)
> def chars(text):
> yield from text
>
> pf.sql(
> "SELECT ch FROM source, LATERAL TABLE(chars(text)) AS T(ch)",
> auto_bind=False,
> source=source,
> chars=chars,
> )
> ```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]