yjhjstz commented on code in PR #1762:
URL: https://github.com/apache/cloudberry/pull/1762#discussion_r3510064155
##########
src/backend/optimizer/prep/prepqual.c:
##########
@@ -1037,13 +1112,27 @@ remove_duplicate_and_subsumed_clauses(List *clauses)
}
else if (or_clause_subsumes(clause, existing))
{
- /* Current subsumes existing, remove
existing */
- result = list_delete_cell(result,
lc_exist);
- break;
+ /*
+ * Current subsumes existing, mark for
removal.
+ * Continue checking other clauses
since the current
+ * clause may subsume multiple existing
clauses.
+ */
+ to_remove = lappend(to_remove,
existing);
Review Comment:
break or not?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]