You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For database developers, query plans are important -- whether a change in optimizer will bring unexpected result? how is a query being processed currently? is every optimization rule work as expected?
To help visualize the result of optimizer, I propose to have a planner test framework in RisingLight.
Planner test will be defined with yaml files in the following format:
- sql: | /* TPC-H Q6 */ create table lineitem(...); select sum(l_extendedprice * l_discount) as revenue from lineitem where l_shipdate >= date '1994-01-01' and l_shipdate < date '1905-01-01' and l_discount between 0.08 - 0.01 and 0.08 + 0.01 and l_quantity < 24;logical_plan: | <the logical plan>physical_plan: | <the batch plan>
For each item in the yaml file, there will be a sequence of SQL statements, where the last statement will be used to do plan test. We will serialize logical plan the physical plan into the yaml, commit them into the git repo, and test if the current optimizer generates the same plan as test cases, so that we can easily compare the changes before and after a PR.
Our plan nodes already supports serialization with serde_erased, so serialization should be easy.
At the same time, we'd better also have a utility command to update the result of all plan test cases, like cargo run --bin apply-planner-test.
The text was updated successfully, but these errors were encountered:
For database developers, query plans are important -- whether a change in optimizer will bring unexpected result? how is a query being processed currently? is every optimization rule work as expected?
To help visualize the result of optimizer, I propose to have a planner test framework in RisingLight.
Planner test will be defined with yaml files in the following format:
For each item in the yaml file, there will be a sequence of SQL statements, where the last statement will be used to do plan test. We will serialize logical plan the physical plan into the yaml, commit them into the git repo, and test if the current optimizer generates the same plan as test cases, so that we can easily compare the changes before and after a PR.
Our plan nodes already supports serialization with
serde_erased
, so serialization should be easy.At the same time, we'd better also have a utility command to update the result of all plan test cases, like
cargo run --bin apply-planner-test
.The text was updated successfully, but these errors were encountered: