mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-04 18:23:05 +00:00
Two review lessons from the post-merge net-diff/whole-repo re-audit of the SQL-dialect classes: - Section 3 (row-count trap) now covers SELECT DISTINCT too: adding the ORDER BY column to the select to satisfy Postgres grows the DISTINCT key and changes the MariaDB row count when the column is not single-valued per distinct row -- sort in Python instead. - New section 6: a 'refactor' / raw-SQL->qb conversion is not automatically 1:1. Diff the WHERE/predicate and the resulting row set, not just the SELECT shape -- a conversion that widens a filter (e.g. posting_datetime > X gaining an OR (== X AND creation > ...) branch under a sql->qb refactor) changes the rows touched on both engines and hides under a refactor label. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>