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

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


The following commit(s) were added to refs/heads/partial_agg by this push:
     new 63691ca  cleanup
63691ca is described below

commit 63691caf22d878ad5d7591d065f9267779a1a580
Author: AlexanderSaydakov <[email protected]>
AuthorDate: Fri Apr 21 12:59:27 2023 -0700

    cleanup
---
 src/aod_sketch_pg_functions.c   | 3 +--
 src/cpc_sketch_c_adapter.cpp    | 2 +-
 src/cpc_sketch_pg_functions.c   | 1 -
 src/hll_sketch_c_adapter.cpp    | 4 ++--
 src/hll_sketch_pg_functions.c   | 1 -
 src/theta_sketch_pg_functions.c | 5 ++---
 6 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/src/aod_sketch_pg_functions.c b/src/aod_sketch_pg_functions.c
index 1b6df01..018be64 100644
--- a/src/aod_sketch_pg_functions.c
+++ b/src/aod_sketch_pg_functions.c
@@ -25,7 +25,6 @@
 #include <catalog/pg_type.h>
 
 #include "aod_sketch_c_adapter.h"
-#include "base64.h"
 #include "kll_float_sketch_c_adapter.h"
 
 enum aod_agg_state_type { MUTABLE_SKETCH, IMMUTABLE_SKETCH, UNION, 
INTERSECTION };
@@ -329,7 +328,7 @@ Datum pg_aod_sketch_intersection_combine(PG_FUNCTION_ARGS) {
   if (PG_ARGISNULL(0) && PG_ARGISNULL(1)) PG_RETURN_NULL();
 
   if (!AggCheckCallContext(fcinfo, &aggcontext)) {
-    elog(ERROR, "aod_sketch_combine called in non-aggregate context");
+    elog(ERROR, "aod_sketch_intersection_combine called in non-aggregate 
context");
   }
   oldcontext = MemoryContextSwitchTo(aggcontext);
 
diff --git a/src/cpc_sketch_c_adapter.cpp b/src/cpc_sketch_c_adapter.cpp
index 00b59cb..1901cac 100644
--- a/src/cpc_sketch_c_adapter.cpp
+++ b/src/cpc_sketch_c_adapter.cpp
@@ -147,7 +147,7 @@ void cpc_union_update(void* unionptr, const void* 
sketchptr) {
 
 void* cpc_union_get_result(void* unionptr) {
   try {
-    auto sketchptr = new (palloc(sizeof(cpc_sketch_pg))) 
cpc_sketch_pg(static_cast<cpc_union_pg*>(unionptr)->get_result());
+    auto sketchptr = new (palloc(sizeof(cpc_sketch_pg))) 
cpc_sketch_pg(static_cast<const cpc_union_pg*>(unionptr)->get_result());
     static_cast<cpc_union_pg*>(unionptr)->~cpc_union_pg();
     pfree(unionptr);
     return sketchptr;
diff --git a/src/cpc_sketch_pg_functions.c b/src/cpc_sketch_pg_functions.c
index 6a6082d..bb12bc1 100644
--- a/src/cpc_sketch_pg_functions.c
+++ b/src/cpc_sketch_pg_functions.c
@@ -25,7 +25,6 @@
 #include <catalog/pg_type.h>
 
 #include "cpc_sketch_c_adapter.h"
-#include "base64.h"
 #include "agg_state.h"
 
 const unsigned CPC_DEFAULT_LG_K = 11;
diff --git a/src/hll_sketch_c_adapter.cpp b/src/hll_sketch_c_adapter.cpp
index ca5787c..e61618e 100644
--- a/src/hll_sketch_c_adapter.cpp
+++ b/src/hll_sketch_c_adapter.cpp
@@ -152,7 +152,7 @@ void hll_union_update(void* unionptr, const void* 
sketchptr) {
 
 void* hll_union_get_result(void* unionptr) {
   try {
-    auto sketchptr = new (palloc(sizeof(hll_sketch_pg))) 
hll_sketch_pg(static_cast<hll_union_pg*>(unionptr)->get_result());
+    auto sketchptr = new (palloc(sizeof(hll_sketch_pg))) 
hll_sketch_pg(static_cast<const hll_union_pg*>(unionptr)->get_result());
     static_cast<hll_union_pg*>(unionptr)->~hll_union_pg();
     pfree(unionptr);
     return sketchptr;
@@ -164,7 +164,7 @@ void* hll_union_get_result(void* unionptr) {
 
 void* hll_union_get_result_tgt_type(void* unionptr, unsigned tgt_type) {
   try {
-    auto sketchptr = new (palloc(sizeof(hll_sketch_pg))) 
hll_sketch_pg(static_cast<hll_union_pg*>(unionptr)->get_result(
+    auto sketchptr = new (palloc(sizeof(hll_sketch_pg))) 
hll_sketch_pg(static_cast<const hll_union_pg*>(unionptr)->get_result(
       tgt_type == 4 ? datasketches::target_hll_type::HLL_4 : tgt_type == 6 ? 
datasketches::target_hll_type::HLL_6 : datasketches::target_hll_type::HLL_8
     ));
     static_cast<hll_union_pg*>(unionptr)->~hll_union_pg();
diff --git a/src/hll_sketch_pg_functions.c b/src/hll_sketch_pg_functions.c
index 791e223..4e8c92e 100644
--- a/src/hll_sketch_pg_functions.c
+++ b/src/hll_sketch_pg_functions.c
@@ -25,7 +25,6 @@
 #include <catalog/pg_type.h>
 
 #include "hll_sketch_c_adapter.h"
-#include "base64.h"
 
 enum hll_agg_state_type { SKETCH, UNION };
 
diff --git a/src/theta_sketch_pg_functions.c b/src/theta_sketch_pg_functions.c
index 7e7e3d3..e72bb80 100644
--- a/src/theta_sketch_pg_functions.c
+++ b/src/theta_sketch_pg_functions.c
@@ -25,7 +25,6 @@
 #include <catalog/pg_type.h>
 
 #include "theta_sketch_c_adapter.h"
-#include "base64.h"
 #include "agg_state.h"
 
 /* PG_FUNCTION_INFO_V1 macro to pass functions to postgres */
@@ -256,7 +255,7 @@ Datum pg_theta_sketch_union_combine(PG_FUNCTION_ARGS) {
   if (PG_ARGISNULL(0) && PG_ARGISNULL(1)) PG_RETURN_NULL();
 
   if (!AggCheckCallContext(fcinfo, &aggcontext)) {
-    elog(ERROR, "theta_sketch_combine called in non-aggregate context");
+    elog(ERROR, "theta_sketch_union_combine called in non-aggregate context");
   }
   oldcontext = MemoryContextSwitchTo(aggcontext);
 
@@ -301,7 +300,7 @@ Datum 
pg_theta_sketch_intersection_combine(PG_FUNCTION_ARGS) {
   if (PG_ARGISNULL(0) && PG_ARGISNULL(1)) PG_RETURN_NULL();
 
   if (!AggCheckCallContext(fcinfo, &aggcontext)) {
-    elog(ERROR, "theta_sketch_combine called in non-aggregate context");
+    elog(ERROR, "theta_sketch_intersection_combine called in non-aggregate 
context");
   }
   oldcontext = MemoryContextSwitchTo(aggcontext);
 


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

Reply via email to