I’m having troubles using the lifting functionality in Query.jl and DataValues.jl with dot syntax.
If I simply try the following
using DataValues
a = DataValue(0.4)
a .* 2
I get the this error:
ERROR: MethodError: no method matching length(::DataValue{Float64})
How is this supposed to work?
Julia version:
Julia Version 1.9.0-rc1
Commit 3b2e0d8fbc1 (2023-03-07 07:51 UTC)
Platform Info:
OS: macOS (arm64-apple-darwin21.4.0)
CPU: 8 × Apple M1 Pro
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-14.0.6 (ORCJIT, apple-m1)
Threads: 4 on 6 virtual cores
Query.jl version: 1.0.0
DataValues.jl vesion: 0.14.13
Lifting via dot got lost in the transition to Julia 1.0… Still hope to get it back at some point.
I think for your example you can just do a * 2 and that should work, i.e. for most of the common operations lifting happens automatically.
I see… thanks. Maybe I was misinformed because it is still mentioned in the docs somewhere.
Actually, my use case is more complicated: I need to convert a Decimal to a Float* but the conversion it’s not lifted. So I ended up doing something like this:
@mutate(a=Float64(_.a[]))
filtering first missing values. Or one can define a conversion function that accepts DataValues, but I didn’t find anything automatic.