Skip to content

Commit

Permalink
Revert "Fix error with ByRow on import (#366)"
Browse files Browse the repository at this point in the history
This reverts commit 1fd3c1a.
  • Loading branch information
pdeffebach authored Nov 7, 2023
1 parent 1fd3c1a commit f39afc4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 39 deletions.
8 changes: 4 additions & 4 deletions src/parsing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ returns `nothing`.
get_column_expr(x) = nothing
function get_column_expr(e::Expr)
e.head == :$ && return e.args[1]
onearg(e, :AsTable) && return :($AsTable($(e.args[2])))
onearg(e, :AsTable) && return e
if onearg(e, :cols)
Base.depwarn("cols is deprecated use $DOLLAR to escape column names instead", :cols)
return e.args[2]
Expand Down Expand Up @@ -295,9 +295,9 @@ function get_source_fun(function_expr; exprflags = deepcopy(DEFAULT_FLAGS))

if exprflags[BYROW_SYM][]
if exprflags[PASSMISSING_SYM][]
fun = :($ByRow($(Missings.passmissing)($fun)))
fun = :(ByRow(Missings.passmissing($fun)))
else
fun = :($ByRow($fun))
fun = :(ByRow($fun))
end
end

Expand Down Expand Up @@ -350,7 +350,7 @@ function fun_to_vec(ex::Expr;
if final_flags[ASTABLE_SYM][]
src, fun = get_source_fun_astable(ex; exprflags = final_flags)

return :($src => $fun => $AsTable)
return :($src => $fun => AsTable)
end

if no_dest # subset and with
Expand Down
2 changes: 1 addition & 1 deletion src/parsing_astable.jl
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function get_source_fun_astable(ex; exprflags = deepcopy(DEFAULT_FLAGS))
# and if-so, making a named tuple with
# missing values
if exprflags[BYROW_SYM][]
fun = :($ByRow($fun))
fun = :(ByRow($fun))
end

return source, fun
Expand Down
34 changes: 0 additions & 34 deletions test/import.jl

This file was deleted.

0 comments on commit f39afc4

Please sign in to comment.