Whole file

kayak/pypika

The author described this change as Fix is_aggregate property for Case fields.. It counts as a record because the check below fails on the code as it stood at cb28b93e9 and passes on e805d9e05, with nothing else changed between the two runs.

Fix saved2020-06-16
Sharing licenceApache-2.0 · LICENSE.txt
Change size+2 2

What the code was meant to do, written into the code itself as a save note

Fix is_aggregate property for Case fields.

The change

974974
975975 @property
976976 def is_aggregate(self) -> Optional[bool]:
977- # True if all cases are True or None. None all cases are None. Otherwise, False
977+ # True if all criterions/cases are True or None. None all cases are None. Otherwise, False
978978 return resolve_is_aggregate(
979- [term.is_aggregate for _, term in self._cases]
979+ [criterion.is_aggregate or term.is_aggregate for criterion, term in self._cases]
980980 + [self._else.is_aggregate if self._else else None]
981981 )
982982

The check that tells the two apart

failpass·pypika/tests/test_aggregate.py::IsAggregateTests::test__agg_case_criterion_is_aggregate

Check file pypika/tests/test_aggregate.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 itcb28b93e9c1159e490c3559e8467c7cfebb0ec5a
Broken version dated2020-05-26
Modulepypika.terms
Units changedCase
Fingerprint014a3cc88bb5c44a
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.

Other bugs found in kayak/pypika