Skip to content

Commit

Permalink
Fix parent scope resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
jonmmease committed Feb 20, 2024
1 parent 3c19bf8 commit 66cb4a6
Show file tree
Hide file tree
Showing 4 changed files with 1,083 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vegafusion-core/src/planning/projection_pushdown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,8 @@ impl GetDatasetsColumnUsage for MarkSpec {
// the subset datasets are used.
if let Some(facet) = self.from.as_ref().and_then(|from| from.facet.clone()) {
let facet_data_var = Variable::new_data(&facet.data);
if let Ok(resolved) = task_scope.resolve_scope(&facet_data_var, usage_scope) {
let parent_scope = &usage_scope[0..usage_scope.len() - 1];
if let Ok(resolved) = task_scope.resolve_scope(&facet_data_var, parent_scope) {
let scoped_facet_data_var = (resolved.var, resolved.scope);
usage = usage.with_unknown_usage(&scoped_facet_data_var);
}
Expand Down
35 changes: 35 additions & 0 deletions vegafusion-runtime/tests/specs/custom/gh_463.comm_plan.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"server_to_client": [
{
"name": "data_0",
"namespace": "data",
"scope": []
},
{
"name": "data_0_color_domain_Major Genre",
"namespace": "data",
"scope": []
},
{
"name": "data_3",
"namespace": "data",
"scope": []
},
{
"name": "data_3_x_domain_MPAA Rating",
"namespace": "data",
"scope": []
},
{
"name": "facet_domain",
"namespace": "data",
"scope": []
},
{
"name": "facet_domain_row",
"namespace": "data",
"scope": []
}
],
"client_to_server": []
}
Loading

0 comments on commit 66cb4a6

Please sign in to comment.