That's what I like about it: nobody has to win the argument about grain, the two numbers settle it. I'd put both in the sign-off record too, so the next person who touches the query can see what the grain was on the day it passed.
Yeah, putting both counts in the sign-off record makes it much easier for the next person to check.
I’d still probably want to keep the query version alongside them though. Then someone can rerun it and see whether a new join changed the grain, rather than trying to work backwards from a note that just says “order line.”
Agreed, a note on its own goes stale. I'd store the query file's commit hash next to the two counts in the sign-off record. The next person reruns that exact version, and if the counts drift, a diff of the query shows whether the join changed or the data did.
Storing the commit hash next to the counts is a clean way to pin the version.
I'd also keep a copy of the query text in the same record, or a link to that exact blob. The hash is exact, but if the file is renamed or the history is rewritten, the next person still needs a way to reopen it.
Good point on renames. I'd save the GitHub link to the file at that exact commit (the /blob/<hash>/ URL), since it still opens after the file moves on main. And I'd paste the query text itself into the sign-off record too, because a rewritten history can take the commit with it.
We're a place where coders share, stay up-to-date and grow their careers.
Printing both counts next to the total is a neat alarm.
If they differ, the grain is order line no matter what the PR title says. Two numbers end the argument faster than another meeting.
That's what I like about it: nobody has to win the argument about grain, the two numbers settle it. I'd put both in the sign-off record too, so the next person who touches the query can see what the grain was on the day it passed.
Yeah, putting both counts in the sign-off record makes it much easier for the next person to check.
I’d still probably want to keep the query version alongside them though. Then someone can rerun it and see whether a new join changed the grain, rather than trying to work backwards from a note that just says “order line.”
Agreed, a note on its own goes stale. I'd store the query file's commit hash next to the two counts in the sign-off record. The next person reruns that exact version, and if the counts drift, a diff of the query shows whether the join changed or the data did.
Storing the commit hash next to the counts is a clean way to pin the version.
I'd also keep a copy of the query text in the same record, or a link to that exact blob. The hash is exact, but if the file is renamed or the history is rewritten, the next person still needs a way to reopen it.
Good point on renames. I'd save the GitHub link to the file at that exact commit (the /blob/<hash>/ URL), since it still opens after the file moves on main. And I'd paste the query text itself into the sign-off record too, because a rewritten history can take the commit with it.