Highlights
- Overhaul SQL utilities for greater coverage and flexibility.
- Expand and rename preaggregation optimizations.
- Add vgplot
region
interactor for point-typed screen-space selections. (Example) - Add support for
Param
-valued table references. (Example) - Add support for
Param
-valued column references. By default,Param
values map to literals within SQL expressions. For example, a string-valued param will map to a SQL string literal. However, sometimes users want to dynamically reference a table column instead. This version adds functionality to interpret a param as a SQL column reference, using either thecolumn
transform method (e.g.,vg.column($paramName)
or a special$$
syntax within declarative spec SQL expression strings (e.g.,{ sql: $$paramName ** 2 }
. (Example)
Changelog
- Breaking: Rewrite
mosaic-sql
package to use a complete AST formulation. Add additional SQL helper methods. - Breaking: Drop
agg
SQL expression helper. We now perform automatic analysis to determine if an expression is an aggregate expression. - Breaking: Remove automatic internal casts, such as casting count() aggregates to 32-bit integers. As we dropped Arrow-JS in favor of Flechette, Arrow parsing now gracefully handles 64-bit integers, decimals, and other type conversions.
- Add more SQL operators, math functions,
isIn
function, conditionals, and more. - Move SQL transforms for binning and M4 to
mosaic-sql
package in a newtransforms
folder. - Update plots, inputs, and spec parsing to use new SQL utilities. SQL expressions no longer provide column dependency lists, param listeners, or idiosyncratic annotations. Instead, needed metadata is now extracted using visitor methods that walk the SQL expression AST. All query generator methods now create full, analyzable ASTs using our updated SQL builders.
- Add Param-value support for from table names in vgplot marks and table views. This change permits dynamic swapping of backing data tables at runtime, including among differently sized samples.
- Add column param node type to SQL AST helpers.
- Add
column
transform to declarative spec language. - Add
$$param
syntax to declarative spec SQL expressions to indicate a column-valued param. - Breaking: Rename coordinator
dataCubeIndexer
topreaggregator
. - Breaking: Rename coordinator
indexes
option key topreagg
. - Breaking: Rename pre-aggregation
index
method torequest
. - Breaking: Rename pre-aggregation
dropIndexTables
method todropPreAggregateTables
. - Rename other internal methods and comments to use the terminology of "pre-aggregation" and "pre-aggregated materialized views".
- Update documentation to use the terminology of "pre-aggregation" and "pre-aggregated materialized views".
- Update pre-aggregation optimizations to support arbitrary aggregate expressions, not just individual aggregate function calls. We use the SQL facilities to rewrite expressions for more complex optimized aggregations.
- Update pre-aggregation optimizations to support aggregates with FILTER clauses.
- Refactor pre-aggregation optimizations, moving them to the new
mosaic-core/preagg
folder. - Add
region
interactor for 2D selection of individual point values. - Add use of SQL IN operator for single-value point selections.
- Add
channels
mark property to spec types. - Fix empty selection resolution to use false literal.
- Fix interactor facet handling and datum extraction.
- Fix plot label generator handling of
*
character. - Refactor BrushStyles types to dedicated file.
- Update facet handling to follow changes in Observable Plot.
- Add local test spec loading in dev runner.
- Update top-level Plot attributes: remove
label
, addclip
,ariaLabel
,ariaDescription
- Remove deprecated Coordinator query recorder support.
- Improve TypeScript types and tests in
mosaic-sql
andmosaic-core
. - Basic documentation updates.