Whole file
kayak/pypika
The author described this change as “Fix orderby replace table function”. It counts as a record because the check below fails on the code as it stood at c6681d7f2 and passes on f1fc31960, with nothing else changed between the two runs.
Projectkayak/pypika
Fix saved2019-08-16
Sharing licenceApache-2.0 · LICENSE.txt
Change size+2 −1
What the code was meant to do, written into the code itself as a save note
Fix orderby replace table function
The change
| 520 | 520 | self._prewheres = self._prewheres.replace_table(current_table, new_table) if self._prewheres else None | |
| 521 | 521 | self._groupbys = [groupby.replace_table(current_table, new_table) for groupby in self._groupbys] | |
| 522 | 522 | self._havings = self._havings.replace_table(current_table, new_table) if self._havings else None | |
| 523 | - | self._orderbys = [orderby.replace_table(current_table, new_table) for orderby in self._orderbys] | |
| 523 | + | self._orderbys = [(orderby[0].replace_table(current_table, new_table), orderby[1]) | |
| 524 | + | for orderby in self._orderbys] | |
| 524 | 525 | self._joins = [join.replace_table(current_table, new_table) for join in self._joins] | |
| 525 | 526 | ||
| 526 | 527 | if current_table in self._select_star_tables: |
The check that tells the two apart
fail→pass·pypika/tests/test_query.py::QueryTablesTests::test_replace_orderby_table
Check file pypika/tests/test_query.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 itc6681d7f2b29c45307af0beb0d19a3d46ea6ae0a
Broken version dated2019-08-15
Modulepypika.queries
Units changedQueryBuilder
Fingerprintc08e96a40c89e812
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