Skip to content

Commit 4cdd6ef

Browse files
authored
feat: Limit number of items that can be handled with %in% (#319)
1 parent 9da0115 commit 4cdd6ef

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

R/translate.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,10 @@ rel_translate_lang <- function(
193193
has_na <- FALSE
194194
}
195195

196+
if (length(values) > 100) {
197+
cli::cli_abort("Can't translate {.code {name}} with more than 100 values.")
198+
}
199+
196200
consts <- map(values, do_translate)
197201
ops <- map(consts, ~ list(lhs, .x))
198202
cmp <- map(ops, relexpr_function, name = "r_base::==")

0 commit comments

Comments
 (0)