One function
Reducer in redis/redis-py
The author described this change as “Fix FIELDNAME alias dropping first character of un-prefixed fields (#4224)”. It counts as a record because the checks below fail on the code as it stood at 408806c89 and pass on b336c48ab, with nothing else changed between the two runs.
Projectredis/redis-py
Fix saved2026-07-29
Sharing licenceMIT · LICENSE
Change size+2 −2
What the code was meant to do, written into the code itself as a docstring
Base reducer object for all reducers. See the `redisearch.reducers` module for the actual reducers.
The change
| 31 | 31 | if not self._field: | |
| 32 | 32 | raise ValueError("Cannot use FIELDNAME alias with no field") | |
| 33 | 33 | else: | |
| 34 | - | # Chop off initial '@' | |
| 35 | - | alias = self._field[1:] | |
| 34 | + | # Chop off initial '@', which is optional in field names | |
| 35 | + | alias = self._field.removeprefix("@") | |
| 36 | 36 | self._alias = alias | |
| 37 | 37 | return self | |
| 38 | 38 |
The check that tells the two apart
fail→pass·tests/test_search_aggregation.py::TestReducerAlias::test_fieldname_alias_without_at_prefix
fail→pass·tests/test_search_aggregation.py::TestReducerAlias::test_fieldname_alias_without_at_prefix_in_args
Check file tests/test_search_aggregation.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before it408806c8992b135c656c8560eab8b03d5103dc98
Broken version dated2026-07-29
Moduleredis.commands.search.aggregation
Units changedReducer
Fingerprint50829985191eb4d9
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.