malloy icon indicating copy to clipboard operation
malloy copied to clipboard

Allow unknown function calls to specify an expression type

Open christopherswenson opened this issue 1 year ago • 1 comments

Adds new syntax:

  • function_name!number!measure(...) to mark that the function should be treated as an aggregate expression, including handling distinct keys for joins
  • join1.join2.function_name!number!measure(...)
  • join1.join2.field1.function_name!number!measure(...)
  • field1.function_name!number!measure(...)
  • function_name!number!calculation(...) to mark that the function should be treated as an analytic function, including adding an OVER (...) clause afterward, and support for { partition_by: ..., order_by: ... }
  • function_name!number!dimension(...) is the same as function_name!number(...) but more explicit

This all requires the ##! experimental.unknown_function_expression_types experiment to be enabled.

christopherswenson avatar Feb 07 '24 18:02 christopherswenson

Not sure about measure/calculation vs aggregate/analytic...

christopherswenson avatar Feb 07 '24 18:02 christopherswenson