-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Code cleanup from query profile project #11822
Conversation
Travis build, license check, failed, but seems to be spurious:
All other Phase 1 tests passed (nor surprising, there are no functionality changes in the PR), but because of the flakey Phase 1 build, Phase 2 didn't run. How to I nudge it to try again, just add a trivial commit? I don't see a "try again" button anywhere... |
core/src/main/java/org/apache/druid/java/util/common/guava/ParallelMergeCombiningSequence.java
Outdated
Show resolved
Hide resolved
overall LGTM. CI has been re-triggered. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@paul-rogers thanks for adding javadocs. I left some comments about them.
core/src/main/java/org/apache/druid/java/util/common/guava/ParallelMergeCombiningSequence.java
Outdated
Show resolved
Hide resolved
processing/src/main/java/org/apache/druid/query/QueryMetrics.java
Outdated
Show resolved
Hide resolved
processing/src/main/java/org/apache/druid/query/QueryMetrics.java
Outdated
Show resolved
Hide resolved
processing/src/main/java/org/apache/druid/query/QueryMetrics.java
Outdated
Show resolved
Hide resolved
processing/src/main/java/org/apache/druid/query/QueryMetrics.java
Outdated
Show resolved
Hide resolved
@@ -26,6 +26,13 @@ | |||
import javax.annotation.Nullable; | |||
import java.util.Comparator; | |||
|
|||
/** | |||
* Indexed is a fixed-size, immutable, indexed set of values which allows |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 thanks for adding javadoc!
@FrankChen021 and @jihoonson, thanks for the review! Addressed your comments. In some cases, it meant reverting the change (this is just a cleanup PR, and leaving things be is sometimes the simplest solution.) |
Looks like some conflicts have appeared. Please take a look at the most recent changes. After that, I'll squash commits and resolve conflicts. (It is a pain to resolve conflicts with unsquashed commits.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@paul-rogers thank you for your patience! The latest changes LGTM. +1 after conflicts are resolved.
2e747b7
to
9257b32
Compare
@jihoonson, thanks much for the review. Resolved merge conflicts. Easiest way was to squash commits and rebase on master. Only the files mentioned in the conflict message above were changed. Did not do a full test run; let's see what the Travis run here tells us. Edit: argh, the conflict message was removed by this latest push. The files were:
|
* Fix spelling errors * Fix Javadoc formatting * Abstract out repeated test code * Reuse constants in place of some string literals * Fix up some parameterized types * Reduce warnings reported by Eclipse
9257b32
to
fbfcbaf
Compare
Looks like the build is failing due to incomplete tests. In file out.offer(ResultBatch.TERMINAL); With this one: out.offer((ParallelMergeCombiningSequence.ResultBatch<T>) ResultBatch.TERMINAL); Which is clearly only a compile-time change (to remove a warning.) Yet, the build fails with this error:
This error prevents the Stage 2 tests from running. It seems we've got a situation where we can't clean up warnings in code until we figure out how to fully unit test the code. While having tests is a Good Thing, it seems we've wrapped ourselves around the axel because we didn't require tests when the code was written, but we do require someone else to write the tests to clean up warnings. Suggestions? |
@paul-rogers thanks for bringing this up. People, including myself, have been struggling with a similar issue from time to time. The coverage bot is good to have because it reduces the burden of code review. The reviewer should manually check test coverage otherwise. For your point, I don't think we can enforce the original author to add all tests that cover 100% of the change because it will be another way to wrap ourselves around the axel 🙂 Making a PR will become extremely hard if we raise the bar of coverage check to 100%. I think our current problem is that the bot is not smart enough to tell what are real changes that impact production code path and what are not. We should work on this to make the bot better over time. For this particular PR, I think there could be 3 options for us.
|
@paul-rogers thanks for updating the PR. I just retriggered the failed test which seems flaky. I will merge this PR after it passes. |
Merging this PR. Thanks @paul-rogers! |
@jihoonson, thanks much for your help! |
Description
Code cleanup from query profile project. Cleanup changes done as separate PR to simplify review of the "substantial" changes.
There are no functional changes.
This PR has: