[ 
https://issues.apache.org/jira/browse/BEAM-7013?focusedWorklogId=309031&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-309031
 ]

ASF GitHub Bot logged work on BEAM-7013:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 09/Sep/19 16:22
            Start Date: 09/Sep/19 16:22
    Worklog Time Spent: 10m 
      Work Description: zfraa commented on pull request #9519: [BEAM-7013] Use 
a 0-length byte array to represent empty sketch in HllCount
URL: https://github.com/apache/beam/pull/9519#discussion_r322264216
 
 

 ##########
 File path: 
sdks/java/extensions/zetasketch/src/main/java/org/apache/beam/sdk/extensions/zetasketch/HllCountMergePartialFn.java
 ##########
 @@ -54,10 +54,15 @@ private HllCountMergePartialFn() {}
     return null;
   }
 
+  @Nullable
   @Override
   public HyperLogLogPlusPlus<HllT> addInput(
       @Nullable HyperLogLogPlusPlus<HllT> accumulator, byte[] input) {
 
 Review comment:
   tl;dr: why not handle nulls instead of throwing? 
   
   I didn't find any sources on the exact implied semantics of @Nullable, but I 
would tend to assume if a parameter is annotated with @Nullable, the method 
handles it benignly if it is actually null, vs. throwing an exception.
   I would do one of the following two things: 
   - Either remove the @Nullable annotation and keep throwing below; (again, 
not feeling strongly about this) 
   - Or -- I think we can safely assume that if a null is passed, it's supposed 
to be an empty sketch: maybe a BQ sketch that made it through importing without 
conversion, ... . We have the means to support this smoothly by just treating 
nulls like byte[0] -- why not do this and save the users some exceptions? 
   (would need to be consistently across methods)
 
----------------------------------------------------------------
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:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 309031)
    Time Spent: 30h  (was: 29h 50m)

> A new count distinct transform based on BigQuery compatible HyperLogLog++ 
> implementation
> ----------------------------------------------------------------------------------------
>
>                 Key: BEAM-7013
>                 URL: https://issues.apache.org/jira/browse/BEAM-7013
>             Project: Beam
>          Issue Type: New Feature
>          Components: extensions-java-sketching, sdk-java-core
>            Reporter: Yueyang Qiu
>            Assignee: Yueyang Qiu
>            Priority: Major
>             Fix For: 2.16.0
>
>          Time Spent: 30h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to