|
尊敬的开发者您好:我想要在输出表中进行条件筛选,使用了where语句,结果不行
我的代码如下:
# 处理流程
t_env.from_path('mySource') \
.select("pickup_datetime, dropoff_datetime, pickup_longitude, pickup_latitude, dropoff_longitude, dropoff_latitude, distance_meters(pickup_longitude, pickup_latitude) as O, distance_meters(dropoff_longitude, dropoff_latitude) as D, compute_duration_time(pickup_datetime, dropoff_datetime) as duration") \
.where("duration >= 120 && duration <= 3600") \
.select("pickup_datetime, dropoff_datetime, pickup_longitude, pickup_latitude, dropoff_longitude, dropoff_latitude, O, D, is_same_od(O, D) as same_od, duration") \
.where("same_od == 0") \
.select("pickup_datetime, dropoff_datetime, pickup_longitude, pickup_latitude, dropoff_longitude, dropoff_latitude, O, D, duration") \
.insert_into('mySink')
请问我这样使用where为什么不行呢?我应该如何去筛选出想要的结果呢?
(尝试了去掉where是可以正常运行的)
|