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

Fix bug in JoinToTimeSpine dataflow plans #1577

Merged
merged 3 commits into from
Dec 21, 2024
Merged

Conversation

courtneyholcomb
Copy link
Contributor

We weren't tracking the parent nodes properly, which resulted in improper optimization and nodes missing when displaying the plan. This should not impact the output data, but will hopefully improve query efficiency now that more CTEs are enabled.

@cla-bot cla-bot bot added the cla:yes label Dec 18, 2024
@courtneyholcomb courtneyholcomb added Skip Changelog Run Tests With Other SQL Engines Runs the test suite against the SQL engines in our target environment labels Dec 18, 2024
@dbt-labs dbt-labs deleted a comment from github-actions bot Dec 18, 2024
@github-actions github-actions bot removed the Run Tests With Other SQL Engines Runs the test suite against the SQL engines in our target environment label Dec 18, 2024
Copy link
Contributor

@WilliamDee WilliamDee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@@ -325,6 +325,7 @@ def test_aggregate_output_join_metric_predicate_pushdown(
)


@pytest.mark.skip("Predicate pushdown is not implemented for some of the nodes in this plan")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

were these passing before this change 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! The optimizers weren't correctly going through all the parent nodes, so this was never hitting the AliasSpecsNode. That node is new and doesn't have an implementation for the pushdown optimizer.

Base automatically changed from court/custom-offset2 to main December 21, 2024 02:12
We weren't tracking the parent nodes properly, which resulted in improper optimization and nodes missing when displaying the plan. This should not impact the output data, but will hopefully improve query efficiency now that more CTEs are enabled.
@courtneyholcomb courtneyholcomb enabled auto-merge (squash) December 21, 2024 02:13
@courtneyholcomb courtneyholcomb merged commit 102169a into main Dec 21, 2024
11 checks passed
@courtneyholcomb courtneyholcomb deleted the court/custom-offset3 branch December 21, 2024 02:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants