The upstream_tables list for built SQL should only include source nodes. Including non-source-nodes leads to issues downstream when we try to search for the physical table.
When searching the dimensions graph during SQL building, we should use breadth-first and not depth-first search. Otherwise we'll end up performing a more expensive join to pull in a dimension when we could've used the shortest path.
Summary
This PR has two fixes to the SQL building:
upstream_tables
list for built SQL should only include source nodes. Including non-source-nodes leads to issues downstream when we try to search for the physical table.Test Plan
make check
passesmake test
shows 100% unit test coverageDeployment Plan