Skip to content

Commit

Permalink
Fix gp_hyperloglog cstring type hadnling (#953)
Browse files Browse the repository at this point in the history
fixes issue #952
  • Loading branch information
reshke authored Feb 25, 2025
1 parent c9511cc commit 00da831
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/backend/utils/hyperloglog/gp_hyperloglog.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 00da831

Please # to comment.