Ari Huttunen
03/08/2023, 6:38 PM@udaf(result_type=DataTypes.FLOAT(), func_type="pandas")
def median_udaf(v):
return v.median()
unfortunately it doesn't work due to
Pandas UDAFs are not supported in streaming mode currently.
Please check the documentation for the set of currently supported SQL features.
What can I do? We currently use 1.16, but I figure 1.17 is just around the corner so that could be used as well.Dian Fu
03/09/2023, 2:04 AMAri Huttunen
03/09/2023, 6:02 AMAri Huttunen
03/09/2023, 6:03 AMDian Fu
03/09/2023, 6:08 AMAri Huttunen
03/09/2023, 7:23 AMDian Fu
03/09/2023, 7:24 AMAri Huttunen
03/09/2023, 7:29 AMAri Huttunen
03/09/2023, 7:32 AMAri Huttunen
03/09/2023, 7:33 AMDian Fu
03/09/2023, 7:37 AMt-digest in Python UDAF?Dian Fu
03/09/2023, 7:38 AMAri Huttunen
03/09/2023, 7:57 AMcreate_accumulator()
• accumulate(...)
• get_value(...)
The python functions will then call Java (t-digest) using Py4J (pyflink.java_gateway).Dian Fu
03/09/2023, 8:51 AMAri Huttunen
03/15/2023, 7:31 AMretract(...) API call also is not possible with t-digest as you cannot remove data from it as it's already been combined. In my opinion the API is not particularly good, but it is what it is.Dian Fu
03/15/2023, 9:14 AM