You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by al...@apache.org on 2023/02/03 19:38:31 UTC

[datasketches-postgresql] 01/01: update scripts, fixes #59

This is an automated email from the ASF dual-hosted git repository.

alsay pushed a commit to branch update_scripts
in repository https://gitbox.apache.org/repos/asf/datasketches-postgresql.git

commit c3830cedee81c00a94617fbe70302a45c0ab884c
Author: AlexanderSaydakov <Al...@users.noreply.github.com>
AuthorDate: Fri Feb 3 11:37:56 2023 -0800

    update scripts, fixes #59
---
 Makefile                           |  2 +-
 sql/datasketches--1.3.0--1.4.0.sql | 50 ++++++++++++++++++++++++++++++++++++++
 sql/datasketches--1.4.0--1.5.0.sql | 18 ++++++++++++++
 3 files changed, 69 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 56c74d0..339f7cf 100644
--- a/Makefile
+++ b/Makefile
@@ -29,7 +29,7 @@ SQL_MODULES = sql/datasketches_cpc_sketch.sql \
   sql/datasketches_req_float_sketch.sql \
   sql/datasketches_quantiles_double_sketch.sql
 SQL_INSTALL = sql/$(EXTENSION)--$(EXTVERSION).sql
-DATA = $(SQL_INSTALL)
+DATA = $(SQL_INSTALL) sql/datasketches--1.3.0--1.4.0.sql sql/datasketches--1.4.0--1.5.0.sql
 
 EXTRA_CLEAN = $(SQL_INSTALL)
 
diff --git a/sql/datasketches--1.3.0--1.4.0.sql b/sql/datasketches--1.3.0--1.4.0.sql
new file mode 100644
index 0000000..c93bc9d
--- /dev/null
+++ b/sql/datasketches--1.3.0--1.4.0.sql
@@ -0,0 +1,50 @@
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--   http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing,
+-- software distributed under the License is distributed on an
+-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+-- KIND, either express or implied.  See the License for the
+-- specific language governing permissions and limitations
+-- under the License.
+
+CREATE OR REPLACE FUNCTION kll_float_sketch_get_histogram(kll_float_sketch) RETURNS double precision[]
+    AS '$libdir/datasketches', 'pg_kll_float_sketch_get_histogram'
+    LANGUAGE C STRICT IMMUTABLE;
+
+CREATE OR REPLACE FUNCTION kll_float_sketch_get_histogram(kll_float_sketch, int) RETURNS double precision[]
+    AS '$libdir/datasketches', 'pg_kll_float_sketch_get_histogram'
+    LANGUAGE C STRICT IMMUTABLE;
+
+CREATE OR REPLACE FUNCTION theta_sketch_intersection_agg(internal, theta_sketch) RETURNS internal
+    AS '$libdir/datasketches', 'pg_theta_sketch_intersection_agg'
+    LANGUAGE C IMMUTABLE;
+ 
+CREATE OR REPLACE FUNCTION theta_intersection_get_result(internal) RETURNS theta_sketch
+    AS '$libdir/datasketches', 'pg_theta_intersection_get_result'
+    LANGUAGE C STRICT IMMUTABLE;
+
+CREATE AGGREGATE theta_sketch_intersection(theta_sketch) (
+    sfunc = theta_sketch_intersection_agg,
+    stype = internal,
+    finalfunc = theta_intersection_get_result
+);
+
+CREATE OR REPLACE FUNCTION theta_sketch_union(theta_sketch, theta_sketch) RETURNS theta_sketch
+    AS '$libdir/datasketches', 'pg_theta_sketch_union'
+    LANGUAGE C IMMUTABLE;
+
+CREATE OR REPLACE FUNCTION theta_sketch_union(theta_sketch, theta_sketch, int) RETURNS theta_sketch
+    AS '$libdir/datasketches', 'pg_theta_sketch_union'
+    LANGUAGE C IMMUTABLE;
+
+CREATE OR REPLACE FUNCTION theta_sketch_intersection(theta_sketch, theta_sketch) RETURNS theta_sketch
+    AS '$libdir/datasketches', 'pg_theta_sketch_intersection'
+    LANGUAGE C IMMUTABLE;
diff --git a/sql/datasketches--1.4.0--1.5.0.sql b/sql/datasketches--1.4.0--1.5.0.sql
new file mode 100644
index 0000000..c75a48f
--- /dev/null
+++ b/sql/datasketches--1.4.0--1.5.0.sql
@@ -0,0 +1,18 @@
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--   http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing,
+-- software distributed under the License is distributed on an
+-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+-- KIND, either express or implied.  See the License for the
+-- specific language governing permissions and limitations
+-- under the License.
+
+-- no changes


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