One function
PseudoColumn in kayak/pypika
The author described this change as “fix pseudocolumns in orderby”. It counts as a record because the check below fails on the code as it stood at 8a398afb7 and passes on f3f13ded4, with nothing else changed between the two runs.
Projectkayak/pypika
Fix saved2020-10-19
Sharing licenceApache-2.0 · LICENSE.txt
Change size+1 −0
What the code was meant to do, written into the code itself as a docstring
Represents a pseudo column (a "column" which yields a value when selected but is not actually a real table column).
The change
| 5 | 5 | """ | |
| 6 | 6 | ||
| 7 | 7 | def __init__(self, name: str) -> None: | |
| 8 | + | super().__init__(alias=None) | |
| 8 | 9 | self.name = name | |
| 9 | 10 | ||
| 10 | 11 | def get_sql(self, **kwargs: Any) -> str: |
The check that tells the two apart
fail→pass·pypika/tests/test_pseudocolumns.py::PseudoColumnsTest::test_can_be_used_in_orderby
Check file pypika/tests/test_pseudocolumns.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 it8a398afb7d1e29e5191f2d7f801fc4fa59fb7d8a
Broken version dated2020-10-08
Modulepypika.terms
Units changedPseudoColumn
Fingerprint9fc30e5ad059e812
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
- 2024-04-17fix `Field.__init__` (#742)
- 2023-09-26Fix: Allow the usage of `frozenset` in the `isin(...)` and `notin(...)` functions (#744)
- 2023-09-22fix(terms): fixed EmptyCriterion bug with ComplexCriterion (#732)
- 2021-08-26MySQLQuery
- 2021-01-11Fix empty Postgres array syntax (#539)
- 2021-01-04Fix PostgreSQLQueryBuilder returning clause code causing Py3.9 test failures