-
Notifications
You must be signed in to change notification settings - Fork 96
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
Split up test_dataflow_to_sql_plan module into more manageable components #836
Conversation
The test_dataflow_to_sql_plan module has become a dumping ground for a mixture of direct tests of DataflowPlan to SqlQueryPlan object conversion and tests which are more about query rendering for a variety of metric queries. In preparation for splitting the latter class of tests into their own location, we consolidate the former class into a single block at the top of the module for ease of review.
The dataflow_to_sql_converter fixture was scoped to the package containing the plan_conversion tests, but it's useful anywhere we need an initialized DataflowToSqlQueryPlanConverter built on our most common simple semantic manifest. Since we're splitting up the plan_conversion tests into plan conversion and query rendering, it makes sense to hoist this out to where we define our more broadly available fixtures.
The snapshot generator script had a typo in it preventing any non-duckdb engine from executing. It also shifted to a mark based filter which excluded all engine-agnostic snapshots from regeneration. Since we can rapidly execute those tests without needing an external connection this simply runs a broader set of tests in duckdb, and relies on the mark for our other engine tests.
This is step 1 of the grand effort to break up test_dataflow_to_sql_plan. Here we move the grab bag of query rendering tests exercising basic conversion from metric queries to rendered SQL. Subsequent changes will move more focused testing areas, such as cumulative metrics, derived metrics, and granularity/date part adjustments, to their own modules.
Current dependencies on/for this PR: This stack of pull requests is managed by Graphite. |
Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Quick note - the convert_and_check helper added here removes all of the SqlQueryPlan output because it isn't terribly useful for these more complex rendered queries, and fewer generated files seemed better. |
This is step 1 of the grand effort to break up test_dataflow_to_sql_plan.
Here we move the grab bag of query rendering tests exercising basic
conversion from metric queries to rendered SQL. This naturally follows
some smaller changes which ensure the tests still function correctly.
Subsequent changes will move more focused testing areas, such as
cumulative metrics, derived metrics, and granularity/date part
adjustments, to their own modules.