Skip to content

Commit

Permalink
Handle point selections in projection pushdown (#460)
Browse files Browse the repository at this point in the history
* unescape in project planning

* update comm plan

* Handle point selection in projection pushdown
  • Loading branch information
jonmmease authored Feb 14, 2024
1 parent 274e17a commit 8dcd799
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions vegafusion-core/src/planning/projection_pushdown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,10 @@ impl ChartVisitor for CollectVlSelectionTestFieldsVisitor {
// ]
// }
//
// or, for point selections
//
// "value": [{"field": "year_date", "type": "E"}]
//
// With a corresponding dataset named "{name}_store". If we fine this pair, then use the
// "field" entries in {name}_tuple_fields as column usage fields.
if signal.name.ends_with("_tuple_fields") {
Expand All @@ -765,9 +769,7 @@ impl ChartVisitor for CollectVlSelectionTestFieldsVisitor {
if let Ok(table) = VegaFusionTable::from_json(value) {
// Check that we have "field", "channel", and "type" columns
let schema = &table.schema;
if schema.field_with_name("channel").is_ok()
&& schema.field_with_name("type").is_ok()
{
if schema.field_with_name("type").is_ok() {
if let Ok(field_index) = schema.index_of("field") {
if let Ok(batch) = table.to_record_batch() {
let field_array = batch.column(field_index);
Expand Down

0 comments on commit 8dcd799

Please sign in to comment.