-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-19050][SS][Tests]Fix EventTimeWatermarkSuite 'delay in months and years handled correctly' #16449
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
cc @gatorsmile @tdas |
|
I will merge this PR once this test passes since the master is broken now. |
|
Merging to master and 2.1 |
… and years handled correctly' ## What changes were proposed in this pull request? `monthsSinceEpoch` in this test is like `math.floor(num)`, so `monthDiff` has two possible values. ## How was this patch tested? Jenkins. Author: Shixiong Zhu <[email protected]> Closes #16449 from zsxwing/watermark-test-hotfix. (cherry picked from commit 2394047) Signed-off-by: Shixiong Zhu <[email protected]>
|
Test build #70777 has finished for PR 16449 at commit
|
|
It sounds like our watermarkTime delay calculation causes this issue. Below are two typical cases: Case 1: when setting the watermark delay to 1 month interval: .withWatermark("eventTime", "1 months")the Case 2: when setting the watermark delay to 1 month interval: .withWatermark("eventTime", "29 months")the It sounds like it is caused by our intentional over-estimation (that is, by using 31 days per month)? |
@gatorsmile this is an expected behavior. It's intentional and it's correct as per the comment in
If the user wants to filter data accurately, they need to use That's why I changed the test rather than the watermark calculation. |
|
Yeah, agree. This is a bug in the test cases. Thanks! |
… and years handled correctly' ## What changes were proposed in this pull request? `monthsSinceEpoch` in this test is like `math.floor(num)`, so `monthDiff` has two possible values. ## How was this patch tested? Jenkins. Author: Shixiong Zhu <[email protected]> Closes apache#16449 from zsxwing/watermark-test-hotfix.
… and years handled correctly' ## What changes were proposed in this pull request? `monthsSinceEpoch` in this test is like `math.floor(num)`, so `monthDiff` has two possible values. ## How was this patch tested? Jenkins. Author: Shixiong Zhu <[email protected]> Closes apache#16449 from zsxwing/watermark-test-hotfix.
… and years handled correctly' ## What changes were proposed in this pull request? `monthsSinceEpoch` in this test is like `math.floor(num)`, so `monthDiff` has two possible values. ## How was this patch tested? Jenkins. Author: Shixiong Zhu <[email protected]> Closes apache#16449 from zsxwing/watermark-test-hotfix. (cherry picked from commit 2394047) Signed-off-by: Shixiong Zhu <[email protected]>
… and years handled correctly' ## What changes were proposed in this pull request? `monthsSinceEpoch` in this test is like `math.floor(num)`, so `monthDiff` has two possible values. ## How was this patch tested? Jenkins. Author: Shixiong Zhu <[email protected]> Closes apache#16449 from zsxwing/watermark-test-hotfix. (cherry picked from commit 2394047) Signed-off-by: Shixiong Zhu <[email protected]>
What changes were proposed in this pull request?
monthsSinceEpochin this test is likemath.floor(num), somonthDiffhas two possible values.How was this patch tested?
Jenkins.