AlexanderSaydakov edited a comment on issue #10042:
URL: https://github.com/apache/druid/issues/10042#issuecomment-675765282


   I do it using a unit test in the datasketches library. Druid is not 
involved. It is a simplification, of course, but I need some way to reproduce 
the problem.
   First, I decode using base64 binary on macOS: base64 -D sketch.b64 > 
sketch.bin
   Then a unit test:
   ```
     @Test
     public void sketchFromLucas() throws Exception {
       byte[] bytes = 
com.yahoo.sketches.tuple.TestUtil.readBytesFromFile(getClass().getClassLoader().getResource("sketch.bin").getFile());
       Sketch sketch = Sketches.wrapSketch(Memory.wrap(bytes));
       System.out.println(sketch);
     }
   ```
   The test assumes that the binary file is in src/test/resources. Perhaps, I 
could read Base64 and decode in the test, but I am used to this way. There is 
always more than one way.


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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to