Hi all, I'm having an issuer where selecting `wind...
# troubleshooting
p
Hi all, I'm having an issuer where selecting
window_start
in a lateral join results in a NullPointerException. I'm using Flink version
1.17.1
. So my example looks like this:
Copy code
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?
I noticed that I need to do the flattening before the windowing. Therefore, I'm not facing this issue anymore.