Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up'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