-
Notifications
You must be signed in to change notification settings - Fork 991
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'on' clause fails on white spaces around operators and on operators in variable names #3092
Comments
To me the first issue is not a bug though perhaps a better error message would be nicer. (That said the first time I encountered it I immediately understood what was going on.) Might also be worth considering these pathological beauties if only to settle the rules: DT <- data.table(`a=` = 1:3, a = 1:3, `=` = 1:3, b = 1:3)
i <- data.table(`=a` = 1:3, a = 1:3, `=` = 1:3, bi = 11:13) |
We already have some verboten column names ( |
I also think the no-whitespace thing is okay but maybe could be clearer. @MichaelChirico Re verboten or late-verboten patterns (that the user only notices when joining), it seems more natural to me to allow most names (except .SD and whatever else is already blocked), but just support backticks, like in Markus' original attempt. That's where the syntax for
Backticks don't work in the string or Misc comments: Without support for backticks, as far as I know, there's no way to handle Hugh's examples. Lack of support for backticks also forces use of the string form, but that's not a big deal. Maybe related: #1639 |
@MichaelChirico I think it's only forbidden if you go through the front entrance:
|
The issue originally popped up her : #2931.
There are two issues from my perspective with 'on'.
First:
White spaces around operators make it fail:
Second:
Column names including operators make it fail
The text was updated successfully, but these errors were encountered: