Skip to content

Commit 5361387

Browse files
committed
throw error if cols is not specified for sort
1 parent d035a95 commit 5361387

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/sort/sort.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ function Base.sortperm(ds::SubDataset, cols; alg = HeapSortAlg(), rev = false, m
131131
_sortperm_v(ds, cols, rev, a = alg, mapformats = mapformats, stable = stable, threads = threads)[2]
132132
end
133133

134+
Base.sort(ds::AbstractDataset; kwargs...) = throw(ArgumentError("pass the sorting columns as the second argument"))
135+
Base.sortperm(ds::AbstractDataset; kwargs...) = throw(ArgumentError("pass the sorting columns as the second argument"))
136+
134137

135138
function unsort!(ds::Dataset; threads = true)
136139
isempty(ds) && return ds

0 commit comments

Comments
 (0)