cboumalh commented on issue #699:
URL: 
https://github.com/apache/datasketches-java/issues/699#issuecomment-3656674808

   Sure, code is below
   
   ```
   import org.apache.datasketches.tuple.strings.{ArrayOfStringsSummary, 
ArrayOfStringsSummaryFactory, ArrayOfStringsSummarySetOperations}
   import org.apache.datasketches.tuple.{Union}
   import org.apache.datasketches.theta.UpdateSketch;
   import org.apache.datasketches.tuple.UpdatableSketchBuilder;
   
   
   val thetaBldr = UpdateSketch.builder();
   val thetaSk = thetaBldr.build();
   
   val ufactory = new ArrayOfStringsSummaryFactory()
   val tupleBldr = new UpdatableSketchBuilder[Array[String], 
ArrayOfStringsSummary](ufactory);
   val tupleSk = tupleBldr.build()
   
   thetaSk.update("a");
   thetaSk.update("b");
   thetaSk.update("c");
   
   tupleSk.update("a", Array("x", "y"))
   tupleSk.update("b", Array("z"))
   tupleSk.update("e", Array("x", "z"))
   
   val stringArraySetOps = new ArrayOfStringsSummarySetOperations()
   
   val union = new Union(stringArraySetOps);
   
   union.union(tupleSk)
   
   // I'm assuming we can call the update method here on the summary returned 
by .newSummary()
   // but would we want to just have it default to something that does not 
throw an 
   // error (similar to double and integer defaults)?
   union.union(thetaSk, ufactory.newSummary());
   ```


-- 
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: [email protected]

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