This is an automated email from the ASF dual-hosted git repository. maxyang pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/cloudberry.git
The following commit(s) were added to refs/heads/main by this push: new 00da831842 Fix gp_hyperloglog cstring type hadnling (#953) 00da831842 is described below commit 00da831842077cc170f12293a1aadc4c49ff00dc Author: reshke <reshke@double.cloud> AuthorDate: Tue Feb 25 11:14:59 2025 +0500 Fix gp_hyperloglog cstring type hadnling (#953) fixes issue https://github.com/apache/cloudberry/issues/952 --- src/backend/utils/hyperloglog/gp_hyperloglog.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/backend/utils/hyperloglog/gp_hyperloglog.c b/src/backend/utils/hyperloglog/gp_hyperloglog.c index f9ce8e3324..5567eb0cd5 100644 --- a/src/backend/utils/hyperloglog/gp_hyperloglog.c +++ b/src/backend/utils/hyperloglog/gp_hyperloglog.c @@ -786,6 +786,11 @@ gp_hyperloglog_add_item(GpHLLCounter hllcounter, Datum element, int16 typlen, bo /* varlena */ hyperloglog = gp_hll_add_element(hyperloglog, VARDATA_ANY(element), VARSIZE_ANY_EXHDR(element)); } + else if (typlen == -2) + { + /* cstring */ + hyperloglog = gp_hll_add_element(hyperloglog, DatumGetCString(element), strlen(DatumGetCString(element))); + } else if (typbyval) { /* fixed-length, passed by value */ --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cloudberry.apache.org For additional commands, e-mail: commits-h...@cloudberry.apache.org