AlexanderSaydakov commented on code in PR #5:
URL: 
https://github.com/apache/datasketches-bigquery/pull/5#discussion_r1710573841


##########
theta_sketch_a_not_b.sql:
##########
@@ -15,8 +15,18 @@
 # specific language governing permissions and limitations
 # under the License.
 
-CREATE OR REPLACE FUNCTION 
`$BQ_PROJECT.$BQ_DATASET`.theta_sketch_a_not_b(sketch1 BYTES, sketch2 BYTES, 
seed INT64) RETURNS BYTES LANGUAGE js
-OPTIONS (library=["$GCS_BUCKET/theta_sketch.js"]) AS R"""
+CREATE OR REPLACE FUNCTION 
`$BQ_PROJECT.$BQ_DATASET`.theta_sketch_a_not_b(sketch1 BYTES, sketch2 BYTES, 
seed INT64)
+RETURNS BYTES
+LANGUAGE js
+OPTIONS (
+  library=["$GCS_BUCKET/theta_sketch.js"],
+  description = '''Performs the scalar set difference: sketch1 and not sketch2.
+Param sketch1: the first sketch "a" as bytes.
+Param sketch2: the second sketch "b" as bytes.

Review Comment:
   as I understand, base64 is implicitly done by the engine. from the user's 
perspective this is a binary blob. Functions don't not care if the input 
sketches are compressed or not. We may specify if the output is compressed or 
not, and maybe even make it configurable, but I am inclined to think that more 
CPU to reduce IO must be an almost universally good trade-off in systems like 
this.



##########
theta_sketch_scalar_intersection.sql:
##########
@@ -15,8 +15,18 @@
 # specific language governing permissions and limitations
 # under the License.
 
-CREATE OR REPLACE FUNCTION 
`$BQ_PROJECT.$BQ_DATASET`.theta_sketch_scalar_intersection(sketchBytes1 BYTES, 
sketchBytes2 BYTES, seed INT64) RETURNS BYTES LANGUAGE js
-OPTIONS (library=["$GCS_BUCKET/theta_sketch.js"]) AS R"""
+CREATE OR REPLACE FUNCTION 
`$BQ_PROJECT.$BQ_DATASET`.theta_sketch_scalar_intersection(sketchBytes1 BYTES, 
sketchBytes2 BYTES, seed INT64)

Review Comment:
   we could. feel free to improve consistency



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