`WindowPartitionIter.materializeInput` appends row number to row when sorting
- Dominant language
- Go
- Stars
- 24.4k
- Forks
- 873
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 108
Description
`WindowPartitionIter.materializeInput` appends row number to row when sorting ([code](https://github.com/dolthub/go-mysql-server/blob/e77c2d65f1a59453d73369d9c5555be8b54121c9/sql/expression/function/aggregation/window_partition.go#L172)). This seems like it would cause a similar bug to #11300 (fixed in dolthub/go-mysql-server#3626) where the appended value causes field indexes to be offset.
We need to add testing to make sure this does not cause any sorting issues and fix them if there are any issues.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at sql/expression/function/aggregation/window_partition.go:172, where WindowPartitionIter.materializeInput is linked, and compare the behavior with the fix for #11300 in dolthub/go-mysql-server#3626. Add regression coverage for sorting and verify that row field indexes remain correct without introducing sorting issues.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, sql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 67/100