Pyspark 此处的where子句由于orderBy而不起作用,是否有解决方法?

Pyspark 此处的where子句由于orderBy而不起作用,是否有解决方法?,pyspark,Pyspark,此处的where子句由于orderBy而不起作用。有办法解决这个问题吗 new_subs_df=new_subs_df.withColumn( “最后一天”, 延迟(col(“x_日期”)。超过( Window.partitionBy('user\u id'))\ .orderBy( 截止日期(col('z_date'),无).asc(), 截止日期(col('y_date'),无).asc() )\ .where(col('event_type')!='1') ) ) w=Window.par

此处的
where
子句由于
orderBy
而不起作用。有办法解决这个问题吗

new_subs_df=new_subs_df.withColumn(
“最后一天”,
延迟(col(“x_日期”)。超过(
Window.partitionBy('user\u id'))\
.orderBy(
截止日期(col('z_date'),无).asc(),
截止日期(col('y_date'),无).asc()
)\
.where(col('event_type')!='1')
)
)
w=Window.partitionBy('user\u id')。orderBy('z\u date','y\u date'))

new_subs_df=new_subs_df.filter(new_subs_df.event_type!=“1”)。选择('user_id', F.滞后(“x日”)。超过(w)。别名(“最后x日”))