queryverse / Query.jl

Query almost anything in julia
Other
394 stars 49 forks source link

TimeArray not a valid sink anymore? #335

Closed louisponet closed 2 years ago

louisponet commented 2 years ago

Hi All, Title says it all. mwe:

using Query, DataFrames, TimeSeries, Dates

df = DataFrame(name=["John", "Sally", "Kirk"], age=[23., 42., 59.], children=[3,5,2], timestamp=[today() for i = 1:3])

x = @from i in df begin
           @select {i.name, i.age, Children=i.children, timestamp=i.timestamp}
           @collect TimeArray
end
# vs
x = @from i in df begin
           @select {i.name, i.age, Children=i.children, timestamp=i.timestamp}
           @collect DataFrame
end
TimeArray(x, timestamp=:timestamp)
davidanthoff commented 2 years ago

This is a problem with TimeArray, it no longer has a constructor that accepts one argument that is a table.