Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql/distsqlrun: don't inspect encoding output during distinct
In the beginning of times a commit was added to teach DISTINCT about the difference between filter columns and selected columns. In that commit a check was added [1] such that the seen marker would only be added if the encoded version of the column contained > 0 bytes. That commit doesn't suggest a reason for the addition of that check, and it is unclear to me now why it was added. (Note that I don't have experience in the distsql directories, so I may be missing some history.) This file has been improved since then, but the diligently check remained. That check caused a GROUP BY with two rows each of empty arrays to not consider those arrays equal (again, since the seen marker was avoided). A experiment removing the check showed that no existing tests failed as a result. And in addition, this new failing test now passed. I can't find any evidence that this check was necessary, or why it was present in the first place. I conclude that it is safe to remove until we find a counter example. Fixes #37544 [1]: 965107f#diff-6a63b13f6fae0ef7417b27292db3f04aR130 Release note (bug fix): Fix GROUP BY for empty arrays.
- Loading branch information