Github user viirya commented on the issue:

    https://github.com/apache/spark/pull/17371
  
    For now, after `withWatermark`, we only update the metadata for the column 
of event time. The expression id is the same. So once we use the column before 
adding watermark `words.timestamp` as grouping expression, it binds to the old 
attribute before watermarking.
    
    I am thinking, should we create new expression id for the watermarking 
column with `withWatermark`? So we must write the query like:
    
        wordsWithWatermark = words.withWatermark("timestamp", "30 seconds")
        windowedCounts = 
wordsWithWatermark.groupBy(window(wordsWithWatermark.timestamp, "30 seconds", 
"30 seconds"), wordsWithWatermark.word).count()



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to