Skip to content

Commit

Permalink
need to sort keyFilter
Browse files Browse the repository at this point in the history
  • Loading branch information
jakesmith committed Sep 20, 2024
1 parent 66b7aea commit 6eb2912
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rtl/eclrtl/rtlnewkey.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2251,15 +2251,19 @@ void RowFilter::splitIntoKeyFilter(const RtlRecord & record, RowFilter &keyFilte
return;

unsigned numKeyedFields = record.getNumKeyedFields();
IConstArrayOf<IFieldFilter> keyFilters;
ForEachItemInRev(i, filters)
{
const IFieldFilter & cur = filters.item(i);
if (cur.queryFieldIndex() < numKeyedFields)
{
keyFilter.addFilter(OLINK(cur));
keyFilters.append(OLINK(cur));
filters.remove(i);
}
}
keyFilters.sort(compareFieldFilters); // NB: need to be ordered ahead of keyFilter.createSegmentMonitors being used
ForEachItemIn(kf, keyFilters)
keyFilter.addFilter(OLINK(keyFilters.item(kf)));
//There is either a payload filter, in which case numFieldsRequired will not change, or now no filter
if (filters.ordinality() == 0)
numFieldsRequired = 0;
Expand Down

0 comments on commit 6eb2912

Please sign in to comment.