Huang Xingbo created FLINK-21856: ------------------------------------ Summary: Fix the bug of using Python UDF from sub-query as input param of Python UDTF Key: FLINK-21856 URL: https://issues.apache.org/jira/browse/FLINK-21856 Project: Flink Issue Type: Bug Components: API / Python Affects Versions: 1.12.2, 1.11.3, 1.13.0 Reporter: Huang Xingbo
This example comes from the user. splitStr is a Python UDTF. train_and_predict is a Python UDF. {code:python} t_env.sql_query(""" select A.hotime , A.before_ta , A.before_rssi , A.after_ta , A.after_rssil , A.nb_tath , A.nb_rssith , nbr_rssi , nbr_ta from (SELECT hotime , before_ta , before_rssi , after_ta , after_rssil , nb_tath , nb_rssith , train_and_predict(nb_tath, nb_rssith) predict FROM source) as A,LATERAL TABLE(splitStr(predict)) as T(nbr_rssi, nbr_ta) """) {code} The root cause is that `train_and_predict` is a RexCorrelVariable which we don't have relevant logic to deal with. A workaround is to use the Table API. -- This message was sent by Atlassian Jira (v8.3.4#803005)