dbt-labs / metricflow

MetricFlow allows you to define, build, and maintain metrics in code.
https://docs.getdbt.com/docs/build/about-metricflow
Other
1.12k stars 92 forks source link

Add direct tests for predicate pushdown optimizer #1303

Closed tlento closed 2 months ago

tlento commented 2 months ago

This addresses the testing gap around the cases covered by the logic internal to the PredicatePushdownOptimizer.

It's rather difficult to hand-construct dataflow plans, so these rely on snapshots of DataflowPlan text output for some carefully selected queries which are known to cover the code paths in question.

github-actions[bot] commented 2 months ago

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.

tlento commented 2 months ago

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @tlento and the rest of your teammates on Graphite Graphite

courtneyholcomb commented 2 months ago

My thought on more edge cases to test: you could test each of the ones you already added, but nested in a derived metric.

tlento commented 2 months ago

My thought on more edge cases to test: you could test each of the ones you already added, but nested in a derived metric.

I'm relying on our existing derived metric coverage (the nested filter test has been instructive), but yes, this is a good idea. I'll think about how to expand scope - setting up the filter sequencing gets pretty nasty.

tlento commented 2 months ago

Merge activity