[Lens] Throw error on array values in formulas #102249
Labels
bug
Fixes for quality problems that affect the customer experience
Feature:Lens
Team:Visualizations
Visualization editors, elastic-charts and infrastructure
Formulas can't handle array valued data, specifically coming from last_value functions. The
math
function is not allowed to return array values, so formulas also cannot return array values. It should be treated as an error to evaluate a formula on an array value column.Steps to reproduce:
last_value(products.base_price)
[lens_merge_tables] > [mapColumn] > [math] > Objects must have a type property
The error message here should be much more obviously caused by array valued fields.
Another option to consider in the long term is allowing the
last_value
function to take a reduce/concat function such aslast_value(products.base_price, reduce='average')
The text was updated successfully, but these errors were encountered: