malloy icon indicating copy to clipboard operation
malloy copied to clipboard

Can't negate analytic value

Open christopherswenson opened this issue 1 year ago • 0 comments

What happens?

When using unary minus on an analytic value in a calculate: block you get an error 'unary minus' Can't use type scalar_analytic number.

To Reproduce

run: any_source -> {
  group_by:
    one is 1

  calculate:
    r is rank()
    neg_r is - r
}

OS:

macOS

Malloy Client:

VSCode

Malloy Client Version:

v0.3.1691613201

Database Connection:

DuckDB

christopherswenson avatar Aug 18 '23 15:08 christopherswenson