GitHub user uncleGen opened a pull request:
https://github.com/apache/spark/pull/17896
[SPARK-20373][SQL][SS] Batch queries with
'Dataset/DataFrame.withWatermark()` does not execute
## What changes were proposed in this pull request?
Any Dataset/DataFrame batch query with the operation `withWatermark` does
not execute because the batch planner does not have any rule to explicitly
handle the EventTimeWatermark logical plan.
The right solution is to simply remove the plan node, as the watermark
should not affect any batch query in any way.
Changes:
- In this PR, we add a new rule `CheckEventTimeWatermark` to check if we
need to ignore the event time watermark. We will ignore watermark in any batch
query.
Followups:
- Add `CheckEventTimeWatermark` into analyzer rule list. We can not add
this rule into analyzer directly, because streaming query will be copied to a
internal batch query in every trigger, and the rule will be applied to this
internal batch query mistakenly. IIUC, we should refactor related codes to
better define a query is batch or streaming. Right?
Others:
- A typo fix in example.
## How was this patch tested?
add new unit test.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/uncleGen/spark SPARK-20373
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/17896.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #17896
----
commit 563721241851751c2bb1736161febe73b8abba3b
Author: uncleGen <[email protected]>
Date: 2017-05-08T03:19:35Z
Ignore event time watermark in batch query.
----
---
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]