Peter Klauke
01/10/2024, 9:41 AMwindow_start in a lateral join results in a NullPointerException. I'm using Flink version 1.17.1 .
So my example looks like this:
table_location_events = t_env.from_path('_location_events_kafka')
table_per_cell = table_location_events.window(
Slide.over(lit(5).minutes).every(lit(1).minutes).on(col('TIMESTAMP')).alias("window")
).group_by(
col('window'), col('cell')
).select(
col('cell'),
col('window').start.alias('window_start'),
neighbour_cells_udf(col('cell')).alias('neighbour_cells'), # results in a String array
)
table_flattened = table_per_cell.select(
col('cell'),
col('neighbour_cells'),
col('window_start'),
).join_lateral(
flatten_udf(col('neighbour_h3_cells')).alias('neighbor_cell')
)
This results in a java.lang.NullPointerException when I try to output it. When I remove col('window_start') in the last select call, then it returns the result I expect though.
Why can't I select window start here?Peter Klauke
01/15/2024, 8:08 AM