Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exec: add test infrastructure to compare results of running operators against processors' output #35922

Closed
yuzefovich opened this issue Mar 19, 2019 · 0 comments · Fixed by #36081
Assignees
Labels
A-sql-execution Relating to SQL execution. C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

Comments

@yuzefovich
Copy link
Member

Writing randomized tests for columnar operators might be pretty hard (mostly due to trickiness of generating the expected output). in order to make that easier we could create a testing infrastructure the goal of which would be running the tests against both the columnar operators and the row-based processors.

@yuzefovich yuzefovich added the A-sql-execution Relating to SQL execution. label Mar 19, 2019
@yuzefovich yuzefovich self-assigned this Mar 19, 2019
@yuzefovich yuzefovich added the C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) label Mar 19, 2019
craig bot pushed a commit that referenced this issue Apr 2, 2019
36081: distsqlrun: add test infra to compare results of processors and operators r=yuzefovich a=yuzefovich

Adds test infrastructure that sets up a processor and the corresponding
columnar operator (as well as necessary columnarizers and materializers),
runs both paths, and checks whether the output matches.

Also, adds tests for general sorter and sort chunks using the introduced
infrastructure.

Fixes: #35922.

Sort chunks test actually found a bug when ordering columns are not "in order", i.e. when the ordering is, for example, on columns `2, 0, 1` and the prefix match len is 1, the chunker wrongly assumes that the input is already ordered on column 0 whereas it is actually ordered on column 2.

I'm not sure whether `distsqlrun` package is the appropriate place, but it was the easiest package to place in.

Release note: None

Co-authored-by: Yahor Yuzefovich <[email protected]>
@craig craig bot closed this as completed in #36081 Apr 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sql-execution Relating to SQL execution. C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant