Skip to content

Commit e835537

Browse files
committed
fix paramsel in handle_array()
1 parent 16ffb9b commit e835537

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/pg_pathman.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,7 @@ handle_const(const Const *c,
762762
}
763763
else
764764
{
765-
result->rangeset = list_make1_irange_full(prel, IR_LOSSY);
765+
result->rangeset = list_make1_irange_full(prel, IR_COMPLETE);
766766
result->paramsel = 1.0;
767767
}
768768

@@ -883,7 +883,7 @@ handle_array(ArrayType *array,
883883
List *ranges;
884884
int i;
885885

886-
/* Set default ranges for OR | AND */
886+
/* Set default rangeset */
887887
ranges = use_or ? NIL : list_make1_irange_full(prel, IR_COMPLETE);
888888

889889
/* Select partitions using values */
@@ -910,23 +910,21 @@ handle_array(ArrayType *array,
910910
ranges = use_or ?
911911
irange_list_union(ranges, wrap.rangeset) :
912912
irange_list_intersection(ranges, wrap.rangeset);
913-
914-
result->paramsel = Max(result->paramsel, wrap.paramsel);
915913
}
916914

917915
/* Free resources */
918916
pfree(elem_values);
919917
pfree(elem_isnull);
920918

921-
/* Save rangeset */
922919
result->rangeset = ranges;
920+
result->paramsel = 1.0;
923921

924922
return; /* done, exit */
925923
}
926924

927925
handle_array_return:
928926
result->rangeset = list_make1_irange_full(prel, IR_LOSSY);
929-
result->paramsel = estimate_paramsel_using_prel(prel, strategy);
927+
result->paramsel = 1.0;
930928
}
931929

932930
/* Boolean expression handler */

0 commit comments

Comments
 (0)