queryverse / Query.jl

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

Warn user if they `@select` a column which doesn't exist #286

Open metanoid opened 5 years ago

metanoid commented 5 years ago

If the user specifies named columns to @select, and any of those columns do not exist, the macro does not provide a warning.

For example, I wanted to get two named columns from a DataFrame called df:

df |> @select(:first_col, :secon_col) # note mis-spelling of `second_col`

Actual behaviour: This returned a query result with only first_col. Expected behaviour: Show a warning like No column "secon_col" in source, and then return a query result with only first_col

davidanthoff commented 5 years ago

I think we could even throw an error in this case.

AliMalik9599 commented 4 years ago

Hi @davidanthoff I am interested in working on this issue if it has not been completed already. Any advice on getting started? I am thinking of just displaying a warning message as long as one of the arguments is valid. Thanks for the help!