You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2021/03/22 16:15:50 UTC

[GitHub] [druid] MakDon opened a new pull request #11021: Update SketchAggregator.java for removing duplicated parentheses

MakDon opened a new pull request #11021:
URL: https://github.com/apache/druid/pull/11021


   Fixes nothing.
   
   ### Description
   
   It seems that here comes a couple of deplicated parentheses.        
   Is it better to remove it for a better view?
   
   <hr>
   
   ##### Key changed/added classes in this PR
    * no class is modified.     
   
   <hr>
   
   <!-- Check the items by putting "x" in the brackets for the done things. Not all of these items apply to every PR. Remove the items which are not done or not relevant to the PR. None of the items from the checklist below are strictly necessary, but it would be very helpful if you at least self-review the PR. -->
   
   This PR has:
   - [x] been self-reviewed.
      - [ ] using the [concurrency checklist](https://github.com/apache/druid/blob/master/dev/code-review/concurrency.md) (Remove this item if the PR doesn't have any relation to concurrency.)
   - [ ] added documentation for new or modified features or behaviors.
   - [ ] added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
   - [ ] added or updated version, license, or notice information in [licenses.yaml](https://github.com/apache/druid/blob/master/dev/license.md)
   - [ ] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
   - [ ] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for [code coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md) is met.
   - [ ] added integration tests.
   - [ ] been tested in a test Druid cluster.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] suneet-s commented on a change in pull request #11021: Update SketchAggregator.java for removing duplicated parentheses

Posted by GitBox <gi...@apache.org>.
suneet-s commented on a change in pull request #11021:
URL: https://github.com/apache/druid/pull/11021#discussion_r609207630



##########
File path: extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/theta/SketchAggregator.java
##########
@@ -112,7 +112,7 @@ static void updateUnion(Union union, Object update)
     } else if (update instanceof byte[]) {
       union.update((byte[]) update);
     } else if (update instanceof Double) {
-      union.update(((Double) update));
+      union.update((Double) update);
     } else if (update instanceof Integer || update instanceof Long) {
       union.update(((Number) update).longValue());

Review comment:
       Why not also update this on this line?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] suneet-s commented on pull request #11021: Update SketchAggregator.java for removing duplicated parentheses

Posted by GitBox <gi...@apache.org>.
suneet-s commented on pull request #11021:
URL: https://github.com/apache/druid/pull/11021#issuecomment-817036229


   Thanks @MakDon 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] suneet-s merged pull request #11021: Update SketchAggregator.java for removing duplicated parentheses

Posted by GitBox <gi...@apache.org>.
suneet-s merged pull request #11021:
URL: https://github.com/apache/druid/pull/11021


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] MakDon commented on a change in pull request #11021: Update SketchAggregator.java for removing duplicated parentheses

Posted by GitBox <gi...@apache.org>.
MakDon commented on a change in pull request #11021:
URL: https://github.com/apache/druid/pull/11021#discussion_r609226271



##########
File path: extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/theta/SketchAggregator.java
##########
@@ -112,7 +112,7 @@ static void updateUnion(Union union, Object update)
     } else if (update instanceof byte[]) {
       union.update((byte[]) update);
     } else if (update instanceof Double) {
-      union.update(((Double) update));
+      union.update((Double) update);
     } else if (update instanceof Integer || update instanceof Long) {
       union.update(((Number) update).longValue());

Review comment:
       Ok, i would work around it soon.
   Thanks for your review very much.
   After finishing it, i would push a commit including the updated test and reply on this PR.
   Thanks again.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] MakDon commented on pull request #11021: Update SketchAggregator.java for removing duplicated parentheses

Posted by GitBox <gi...@apache.org>.
MakDon commented on pull request #11021:
URL: https://github.com/apache/druid/pull/11021#issuecomment-815974233


   LGTM failed caused by read time out. Should i push a commit to trigger the CI to try again?
   Log from LGTM analysis
   `[2021-04-08 15:46:43] [build-stdout] [2021-04-08 15:46:43] [autobuild] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:3.0.0:check (validate) on project druid: Execution validate of goal org.apache.maven.plugins:maven-checkstyle-plugin:3.0.0:check failed: Plugin org.apache.maven.plugins:maven-checkstyle-plugin:3.0.0 or one of its dependencies could not be resolved: Failed to collect dependencies at org.apache.maven.plugins:maven-checkstyle-plugin:jar:3.0.0 -> org.apache.maven:maven-core:jar:3.0 -> org.apache.maven:maven-settings-builder:jar:3.0 -> org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3: Failed to read artifact descriptor for org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3: Could not transfer artifact org.sonatype.plexus:plexus-sec-dispatcher:pom:1.3 from/to central (https://repo.maven.apache.org/maven2): Read timed out -> [Help 1]`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] suneet-s commented on a change in pull request #11021: Update SketchAggregator.java for removing duplicated parentheses

Posted by GitBox <gi...@apache.org>.
suneet-s commented on a change in pull request #11021:
URL: https://github.com/apache/druid/pull/11021#discussion_r609222083



##########
File path: extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/theta/SketchAggregator.java
##########
@@ -112,7 +112,7 @@ static void updateUnion(Union union, Object update)
     } else if (update instanceof byte[]) {
       union.update((byte[]) update);
     } else if (update instanceof Double) {
-      union.update(((Double) update));
+      union.update((Double) update);
     } else if (update instanceof Integer || update instanceof Long) {
       union.update(((Number) update).longValue());

Review comment:
       You are correct, there are no extra parenthesis here. Sorry about that.
   
   CI is complaining because of missing tests for this Aggregator. Do you think you could take a stab at adding some unit tests for this class?
   
   https://github.com/apache/druid/blob/master/dev/intellij-setup.md#Set-Code-Coverage-Runner documents how to run code coverage locally, so you can see which parts of the class are being tested. The unit tests appear to be in `SketchAggregationTest`




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] MakDon commented on pull request #11021: Update SketchAggregator.java for removing duplicated parentheses

Posted by GitBox <gi...@apache.org>.
MakDon commented on pull request #11021:
URL: https://github.com/apache/druid/pull/11021#issuecomment-816350465


   @suneet-s 
   Hello, all checks have passed. Could you review again?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] MakDon commented on a change in pull request #11021: Update SketchAggregator.java for removing duplicated parentheses

Posted by GitBox <gi...@apache.org>.
MakDon commented on a change in pull request #11021:
URL: https://github.com/apache/druid/pull/11021#discussion_r609213962



##########
File path: extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/theta/SketchAggregator.java
##########
@@ -112,7 +112,7 @@ static void updateUnion(Union union, Object update)
     } else if (update instanceof byte[]) {
       union.update((byte[]) update);
     } else if (update instanceof Double) {
-      union.update(((Double) update));
+      union.update((Double) update);
     } else if (update instanceof Integer || update instanceof Long) {
       union.update(((Number) update).longValue());

Review comment:
       Hum, do you mean line 117 ?
   I could not find redundant in this line, could you show me the example?
   Sorry for that i am not so familiar with Java




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] MakDon commented on a change in pull request #11021: Update SketchAggregator.java for removing duplicated parentheses

Posted by GitBox <gi...@apache.org>.
MakDon commented on a change in pull request #11021:
URL: https://github.com/apache/druid/pull/11021#discussion_r609213962



##########
File path: extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/theta/SketchAggregator.java
##########
@@ -112,7 +112,7 @@ static void updateUnion(Union union, Object update)
     } else if (update instanceof byte[]) {
       union.update((byte[]) update);
     } else if (update instanceof Double) {
-      union.update(((Double) update));
+      union.update((Double) update);
     } else if (update instanceof Integer || update instanceof Long) {
       union.update(((Number) update).longValue());

Review comment:
       Hum, do you mean line 117 ?
   I could not find redundant parentheses  in this line, could you show me the example?
   Sorry for that i am not so familiar with Java




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org