[#1] metabase: Rename blindlyProcess()

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2023-06-26 14:49:08 +03:00 committed by Evgenii Stratonikov
parent 73a71a71b0
commit cab51c8cbe

View file

@ -84,7 +84,7 @@ func (db *DB) Select(ctx context.Context, prm SelectPrm) (res SelectRes, err err
return res, ErrDegradedMode
}
if blindlyProcess(prm.filters) {
if checkNonEmpty(prm.filters) {
success = true
return res, nil
}
@ -556,15 +556,12 @@ func markAddressInCache(cache map[string]int, fNum int, addr string) {
}
}
// returns true if query leads to a deliberately empty result.
func blindlyProcess(fs object.SearchFilters) bool {
// Returns true if at least 1 object can satisfy fs.
func checkNonEmpty(fs object.SearchFilters) bool {
for i := range fs {
if fs[i].Operation() == object.MatchNotPresent && isSystemKey(fs[i].Header()) {
return true
}
// TODO: #1148 check other cases
// e.g. (a == b) && (a != b)
}
return false