GitHub user zsxwing opened a pull request: https://github.com/apache/spark/pull/16970
[SPARK-19497][SS]Implement streaming deduplication ## What changes were proposed in this pull request? This PR adds a special streaming deduplication operator to support `dropDuplicates` with `aggregation` and watermark. It reuses the `dropDuplicates` API but creates new logical plan `Deduplication` and new physical plan `DeduplicationExec`. The following cases are supported: - dropDuplicates() (one `dropDuplicates` with any output mode) - withWatermark(...).dropDuplicates().groupBy(...)....outputMode("append") - dropDuplicates().groupBy(...)....outputMode("update") Not supported cases: - dropDuplicates().dropDuplicates() (multiple `dropDuplicates`s) - groupBy(...).dropDuplicates() (`dropDuplicates` after `aggregation`) - dropDuplicates().groupBy(...)....outputMode("complete") ## How was this patch tested? The new unite tests. You can merge this pull request into a Git repository by running: $ git pull https://github.com/zsxwing/spark dedup Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/16970.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 #16970 ---- commit 63a7f4c62b2da32351d008f9719d513e14562e56 Author: Shixiong Zhu <shixi...@databricks.com> Date: 2017-02-15T19:01:57Z Implement deduplication ---- --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org