From 6787a012ea93f34e4193eea5b3cf38d0d23da632 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlio=20Hoffimann?= Date: Tue, 23 Nov 2021 14:39:52 -0300 Subject: [PATCH] Update src/transforms/rename.jl --- src/transforms/rename.jl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/transforms/rename.jl b/src/transforms/rename.jl index 3092c5d6..8a3ac00f 100644 --- a/src/transforms/rename.jl +++ b/src/transforms/rename.jl @@ -31,9 +31,7 @@ function _rename(names, table) oldnames = Tables.columnnames(table) # check if requested renames exist in the table - diff = setdiff(keys(names), oldnames) .|> String |> Tuple - @assert length(diff) == 0 - "The following column[s] were not found in the source table: $diff" + @assert keys(names) ⊆ oldnames "invalid column names" newnames = map(oldnames) do oldname oldname in keys(names) ? names[oldname] : oldname