From 524bfc44e07da634e67a81ad959f32203e1da27a Mon Sep 17 00:00:00 2001 From: onderkalaci Date: Wed, 26 Apr 2023 18:21:26 +0300 Subject: [PATCH] drop support for Abs, use fabs PG commit 357cfefb09115292cfb98d504199e6df8201c957 --- src/backend/columnar/columnar_customscan.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backend/columnar/columnar_customscan.c b/src/backend/columnar/columnar_customscan.c index 8d8d22156..fda726417 100644 --- a/src/backend/columnar/columnar_customscan.c +++ b/src/backend/columnar/columnar_customscan.c @@ -535,7 +535,7 @@ ColumnarIndexScanAdditionalCost(PlannerInfo *root, RelOptInfo *rel, * "anti-correlated" (-1) since both help us avoiding from reading the * same stripe again and again. */ - double absIndexCorrelation = Abs(indexCorrelation); + double absIndexCorrelation = fabs(indexCorrelation); /* * To estimate the number of stripes that we need to read, we do linear @@ -654,7 +654,7 @@ CheckVarStats(PlannerInfo *root, Var *var, Oid sortop, float4 *absVarCorrelation * If the Var is not highly correlated, then the chunk's min/max bounds * will be nearly useless. */ - if (Abs(varCorrelation) < ColumnarQualPushdownCorrelationThreshold) + if (fabs(varCorrelation) < ColumnarQualPushdownCorrelationThreshold) { if (absVarCorrelation) { @@ -662,7 +662,7 @@ CheckVarStats(PlannerInfo *root, Var *var, Oid sortop, float4 *absVarCorrelation * Report absVarCorrelation if caller wants to know why given * var is rejected. */ - *absVarCorrelation = Abs(varCorrelation); + *absVarCorrelation = fabs(varCorrelation); } return false; }