drop support for Abs, use fabs

PG commit 357cfefb09115292cfb98d504199e6df8201c957
pg16_kickoff
onderkalaci 2023-04-26 18:21:26 +03:00
parent 65c88fe854
commit 524bfc44e0
1 changed files with 3 additions and 3 deletions

View File

@ -535,7 +535,7 @@ ColumnarIndexScanAdditionalCost(PlannerInfo *root, RelOptInfo *rel,
* "anti-correlated" (-1) since both help us avoiding from reading the * "anti-correlated" (-1) since both help us avoiding from reading the
* same stripe again and again. * 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 * 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 * If the Var is not highly correlated, then the chunk's min/max bounds
* will be nearly useless. * will be nearly useless.
*/ */
if (Abs(varCorrelation) < ColumnarQualPushdownCorrelationThreshold) if (fabs(varCorrelation) < ColumnarQualPushdownCorrelationThreshold)
{ {
if (absVarCorrelation) if (absVarCorrelation)
{ {
@ -662,7 +662,7 @@ CheckVarStats(PlannerInfo *root, Var *var, Oid sortop, float4 *absVarCorrelation
* Report absVarCorrelation if caller wants to know why given * Report absVarCorrelation if caller wants to know why given
* var is rejected. * var is rejected.
*/ */
*absVarCorrelation = Abs(varCorrelation); *absVarCorrelation = fabs(varCorrelation);
} }
return false; return false;
} }