This is an automated email from the ASF dual-hosted git repository.
alsay pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datasketches-bigquery.git
The following commit(s) were added to refs/heads/main by this push:
new 34fc9f4 configurable bucket path
34fc9f4 is described below
commit 34fc9f43adf489682a2460a505b81431af76fff2
Author: AlexanderSaydakov <[email protected]>
AuthorDate: Tue Jun 11 11:32:16 2024 -0700
configurable bucket path
---
theta_sketch_a_not_b.sql | 2 +-
theta_sketch_agg_string.sql | 4 ++--
theta_sketch_agg_union.sql | 4 ++--
theta_sketch_get_estimate.sql | 2 +-
theta_sketch_scalar_intersection.sql | 2 +-
theta_sketch_scalar_union.sql | 2 +-
theta_sketch_to_string.sql | 2 +-
7 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/theta_sketch_a_not_b.sql b/theta_sketch_a_not_b.sql
index fb2f338..3586a7e 100644
--- a/theta_sketch_a_not_b.sql
+++ b/theta_sketch_a_not_b.sql
@@ -16,7 +16,7 @@
# 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=["gs://datasketches/theta_sketch.js"]) AS R"""
+OPTIONS (library=["$GCS_BUCKET/theta_sketch.js"]) AS R"""
const default_seed = BigInt(9001);
var a_not_b = new Module.theta_a_not_b(seed ? BigInt(seed) : default_seed);
try {
diff --git a/theta_sketch_agg_string.sql b/theta_sketch_agg_string.sql
index 87c2514..e1ebec0 100644
--- a/theta_sketch_agg_string.sql
+++ b/theta_sketch_agg_string.sql
@@ -16,8 +16,8 @@
# under the License.
CREATE OR REPLACE AGGREGATE FUNCTION
`$BQ_PROJECT.$BQ_DATASET`.theta_sketch_agg_string(str STRING, seed INT64 NOT
AGGREGATE) RETURNS BYTES LANGUAGE js
-OPTIONS (library=["gs://datasketches/theta_sketch.mjs"]) AS R"""
-import ModuleFactory from "gs://datasketches/theta_sketch.mjs";
+OPTIONS (library=["$GCS_BUCKET/theta_sketch.mjs"]) AS R"""
+import ModuleFactory from "$GCS_BUCKET/theta_sketch.mjs";
var Module = await ModuleFactory();
const default_lg_k = 12;
const default_seed = BigInt(9001);
diff --git a/theta_sketch_agg_union.sql b/theta_sketch_agg_union.sql
index 37746a5..22bafa5 100644
--- a/theta_sketch_agg_union.sql
+++ b/theta_sketch_agg_union.sql
@@ -16,8 +16,8 @@
# under the License.
CREATE OR REPLACE AGGREGATE FUNCTION
`$BQ_PROJECT.$BQ_DATASET`.theta_sketch_agg_union(sketch BYTES, lg_k INT64 NOT
AGGREGATE) RETURNS BYTES LANGUAGE js
-OPTIONS (library=["gs://datasketches/theta_sketch.mjs"]) AS R"""
-import ModuleFactory from "gs://datasketches/theta_sketch.mjs";
+OPTIONS (library=["$GCS_BUCKET/theta_sketch.mjs"]) AS R"""
+import ModuleFactory from "$GCS_BUCKET/theta_sketch.mjs";
var Module = await ModuleFactory();
const default_lg_k = 12;
const default_seed = BigInt(9001);
diff --git a/theta_sketch_get_estimate.sql b/theta_sketch_get_estimate.sql
index a2b8561..7df0a98 100644
--- a/theta_sketch_get_estimate.sql
+++ b/theta_sketch_get_estimate.sql
@@ -16,7 +16,7 @@
# under the License.
CREATE OR REPLACE FUNCTION
`$BQ_PROJECT.$BQ_DATASET`.theta_sketch_get_estimate(base64 BYTES, seed INT64)
RETURNS INT64 LANGUAGE js
-OPTIONS (library=["gs://datasketches/theta_sketch.js"]) AS R"""
+OPTIONS (library=["$GCS_BUCKET/theta_sketch.js"]) AS R"""
const default_seed = BigInt(9001);
try {
var sketch = Module.compact_theta_sketch.deserializeFromB64(base64, seed ?
BigInt(seed) : default_seed);
diff --git a/theta_sketch_scalar_intersection.sql
b/theta_sketch_scalar_intersection.sql
index 2ff3909..58c38ef 100644
--- a/theta_sketch_scalar_intersection.sql
+++ b/theta_sketch_scalar_intersection.sql
@@ -16,7 +16,7 @@
# 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=["gs://datasketches/theta_sketch.js"]) AS R"""
+OPTIONS (library=["$GCS_BUCKET/theta_sketch.js"]) AS R"""
const default_seed = BigInt(9001);
var intersection = new Module.theta_intersection(seed ? BigInt(seed) :
default_seed);
try {
diff --git a/theta_sketch_scalar_union.sql b/theta_sketch_scalar_union.sql
index 832510c..cacf2a9 100644
--- a/theta_sketch_scalar_union.sql
+++ b/theta_sketch_scalar_union.sql
@@ -16,7 +16,7 @@
# under the License.
CREATE OR REPLACE FUNCTION
`$BQ_PROJECT.$BQ_DATASET`.theta_sketch_scalar_union(sketch1 BYTES, sketch2
BYTES, lg_k INT64, seed INT64) RETURNS BYTES LANGUAGE js
-OPTIONS (library=["gs://datasketches/theta_sketch.js"]) AS R"""
+OPTIONS (library=["$GCS_BUCKET/theta_sketch.js"]) AS R"""
const default_lg_k = 12;
const default_seed = BigInt(9001);
var union = new Module.theta_union(lg_k ? lg_k : default_lg_k, seed ?
BigInt(seed) : default_seed);
diff --git a/theta_sketch_to_string.sql b/theta_sketch_to_string.sql
index 89c9234..3e8cff3 100644
--- a/theta_sketch_to_string.sql
+++ b/theta_sketch_to_string.sql
@@ -16,7 +16,7 @@
# under the License.
CREATE OR REPLACE FUNCTION
`$BQ_PROJECT.$BQ_DATASET`.theta_sketch_to_string(base64 BYTES, seed INT64)
RETURNS STRING LANGUAGE js
-OPTIONS (library=["gs://datasketches/theta_sketch.js"]) AS R"""
+OPTIONS (library=["$GCS_BUCKET/theta_sketch.js"]) AS R"""
try {
const default_seed = BigInt(9001);
var sketch = Module.compact_theta_sketch.deserializeFromB64(base64, seed ?
BigInt(seed) : default_seed);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]