queryverse / Query.jl

Query almost anything in julia
Other
396 stars 50 forks source link

Error with @from #199

Closed HamletFr closed 6 years ago

HamletFr commented 6 years ago

I tried to follow the examples from the docs and get the following error with:

julia> q1 = @from i in df begin
               @where i.age > 40
               @schedule {number_of_children = i.children, i.name}
               @collect DataFrame
       end
ERROR: LoadError: MethodError: no method matching @from(::LineNumberNode, ::Module, ::Expr)
Closest candidates are:
  @from(::LineNumberNode, ::Module, ::Expr, ::Expr) at /Users/XXX/.julia/packages/Query/fzgEu/src/Query.jl:28
in expression starting at /Users/XXX/.julia/packages/Query/fzgEu/src/Query.jl:38

The other example works without a problem:

julia> x = df |> @query(i, begin
                   @where i.age>50
                   @select {i.name, i.children}
                 end) |> DataFrame

I am using Julia v 0.7 and the latest release of Query.

HamletFr commented 6 years ago

used an old documentation