Query.jl icon indicating copy to clipboard operation
Query.jl copied to clipboard

Confusing error message

Open jamii opened this issue 7 years ago • 0 comments

julia> data = @from t in train begin
           @where t.item_nbr == 1 
           @select t
       end
0x6 query result
id │ date │ store_nbr │ item_nbr │ unit_sales │ onpromotion
───┼──────┼───────────┼──────────┼────────────┼────────────

julia> data = @from t in train begin
           @where t.item_nbr == 1 
       end
ERROR: MethodError: no method matching @from(::Expr)
Closest candidates are:
  @from(::Expr, ::Expr) at /home/jamie/.julia/v0.6/Query/src/Query.jl:39

It seems that every query requires a select, but the error message doesn't tell you that.

jamii avatar Jun 25 '18 14:06 jamii