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.

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

55 """
66
77 def __init__(self, name: str) -> None:
8+ super().__init__(alias=None)
89 self.name = name
910
1011 def get_sql(self, **kwargs: Any) -> str:

The check that tells the two apart

failpass·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