You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@datasketches.apache.org by GitBox <gi...@apache.org> on 2022/06/07 22:08:06 UTC

[GitHub] [datasketches-website] priyamtejaswin opened a new pull request, #117: Fixed ThetaSketchJava example; incorrect method call.

priyamtejaswin opened a new pull request, #117:
URL: https://github.com/apache/datasketches-website/pull/117

   Hello,
   I was trying the DataSketches library, starting with the ThetaSketches example for Java core.
   I believe there are some typos in the example.
   The example called `update(<sketch>)` method for updating the union and intersection sketches.
   This is not supported by the class. Fixed/replaced with `union` and `intersection` respectively.
   
   This is an excellent library btw! An amazing effort! Thanks to all the core devs!


-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org


[GitHub] [datasketches-website] leerho commented on pull request #117: Fixed ThetaSketchJava example; incorrect method call.

Posted by GitBox <gi...@apache.org>.
leerho commented on PR #117:
URL: https://github.com/apache/datasketches-website/pull/117#issuecomment-1150119291

   Could you give us some examples of how you would use the IO calls?
   


-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org


[GitHub] [datasketches-website] leerho merged pull request #117: Fixed ThetaSketchJava example; incorrect method call.

Posted by GitBox <gi...@apache.org>.
leerho merged PR #117:
URL: https://github.com/apache/datasketches-website/pull/117


-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org


[GitHub] [datasketches-website] priyamtejaswin commented on pull request #117: Fixed ThetaSketchJava example; incorrect method call.

Posted by GitBox <gi...@apache.org>.
priyamtejaswin commented on PR #117:
URL: https://github.com/apache/datasketches-website/pull/117#issuecomment-1149225025

   On a side note, a new user would have to add some boilerplate code for the example.
   Java won't let me use a lot of the IO calls (`FileOutputStream, FileInputStream`, etc) without adding `try/catch` blocks.
   I could raise a PR with all of that if needed.


-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org


[GitHub] [datasketches-website] priyamtejaswin commented on pull request #117: Fixed ThetaSketchJava example; incorrect method call.

Posted by GitBox <gi...@apache.org>.
priyamtejaswin commented on PR #117:
URL: https://github.com/apache/datasketches-website/pull/117#issuecomment-1150205080

   Hi Lee,
   
   > Could you give us some examples of how you would use the IO calls?
   
   Sure. My IDE was troubling me to handle IO exceptions. So for `FileOutputStream`, instead of 
   ```java
   UpdateSketch sketch1 = UpdateSketch.builder().build();
   for (int key = 0; key < 100000; key++) sketch1.update(key);
   FileOutputStream out1 = new FileOutputStream("/path/ThetaSketch1.bin", false);
   out1.write(sketch1.compact().toByteArray());
   out1.close();
   ```
   I had to rewrite it as 
   ```java
           UpdateSketch sketch1 = UpdateSketch.builder().build();
           for (int key = 0; key < 100000; key++) sketch1.update(key);
           try {
               FileOutputStream out1 = new FileOutputStream("/path/ThetaSketch1.bin", false);
               try {
                   out1.write(sketch1.compact().toByteArray());
                   out1.close();
               } catch (IOException ioe) {
                   System.out.println(ioe.getMessage());
               }
           } catch (FileNotFoundException fnfe) {
               System.out.println(fnfe.getMessage());
           }
   ```
   It's possible this is a IDE specific thing (I develop and test using Intellij).
   
   > Are you talking about the example code? If so, the example code is simplified by design to eliminate a lot of boilerplate code.
   
   Yes. I was talking about the example code specifically.
   Ah yes I guessed the example was simplified to keep the boilerplate out of the way.
   I think it suffices.


-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org


[GitHub] [datasketches-website] leerho commented on pull request #117: Fixed ThetaSketchJava example; incorrect method call.

Posted by GitBox <gi...@apache.org>.
leerho commented on PR #117:
URL: https://github.com/apache/datasketches-website/pull/117#issuecomment-1151572535

   Of course.  But the IOExceptions are entirely due to your use of FileOutputStream and nothing to do with the sketch.


-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org


[GitHub] [datasketches-website] priyamtejaswin commented on pull request #117: Fixed ThetaSketchJava example; incorrect method call.

Posted by GitBox <gi...@apache.org>.
priyamtejaswin commented on PR #117:
URL: https://github.com/apache/datasketches-website/pull/117#issuecomment-1150206567

   > Sure. My IDE was troubling me to handle IO exceptions.
   
   When I say "troubling" I meant it would not let me build and run unless I account the IO exception handling.


-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org


[GitHub] [datasketches-website] leerho commented on pull request #117: Fixed ThetaSketchJava example; incorrect method call.

Posted by GitBox <gi...@apache.org>.
leerho commented on PR #117:
URL: https://github.com/apache/datasketches-website/pull/117#issuecomment-1150115843

   Thank you!


-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org


[GitHub] [datasketches-website] leerho commented on pull request #117: Fixed ThetaSketchJava example; incorrect method call.

Posted by GitBox <gi...@apache.org>.
leerho commented on PR #117:
URL: https://github.com/apache/datasketches-website/pull/117#issuecomment-1150123210

   Are you talking about the example code?  If so, the example code is simplified by design to eliminate a lot of boilerplate code.
   


-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org