Repository navigation
Conversation
10 of 11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This grades the row estimates of a plan against the rows each operator produced, which is item six of J8 (tamnd/rudb#1852) and section 12.8 of the JOB notes.
In the harness,
Operatornow readsestimated_rowsfrom the rudb metrics document andFlowcarries how many operators had an estimate, the median q-error and the worst one, in tenths so the record stays whole numbers. The saved record appends the three fields, so older files still open and read as zero estimates. The report gets a q-error column in the "Inside the engine" table and one line with the 50th, 90th and 99th percentile and the maximum of the per query worst.In
scripts/job-gate.pythere is a newqerrorcommand. It runs each query once per engine outside any timing, with rudb writing its metrics document and DuckDB writing its JSON profile, and grades every operator both engines had an estimate for. It prints the joins, every operator, and the top join of each query. The top join matters because both engines filter a scan under a hash join by the keys the other side found, so an operator under a join can produce fewer rows than its subplan really has. Nothing filters the top join, so that one is the estimate against the true size of the whole join.First run on server2, rule off, main at bce4a8c88, six threads:
rudb's worst join estimate is closer than DuckDB's in 82 of the 113 queries. The P-error is not here yet. It needs the planner to be handed true cardinalities, which is a change in rudb.
Tested on server3 with
cargo test --lib(398 passed) and clippy with-D warnings.