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 upForcing generated column names to lower case is unnecessary #41
Comments
|
The initial idea of setting colnames Saying that I am happy to remove the |
|
Created a branch: https://github.com/DyfanJones/RAthena/tree/column_name As the package has recently been released on the cran, I won't push these changes to the cran just yet and try and capture anymore issues/ bugs before pushing to the cran. In the meantime you can install the dev version with the following command.
Note: I haven't ran the unit tests just yet. if you notice anything that comes up from this change. Please let me know :) |
|
@DyfanJones thanks for your fast response as always! I understand your point too and in some situations things would probably go smoother with the 'forced' lower case. Still, I think it is good to have things aligned with the rest of dplyr, so obviously will not protest the changes you made and :) Will let you know if I bump into something. |
|
@OssiLehtinen the branch is currently a little buggy, i am troubleshooting about it is kicking up the error. so bewared This has now been fixed |
|
This branch should be able to cater for the example you have provided above. |
|
The example works well now! Now something seems to go haywire with copy_to, however. For example a simple Not at all sure why, but it seems the changes to table.R are behind this. Are these changes needed for addressing the original issue? |
|
Found it, this is a bug due to my change in the last pull request. My apologies, I have now fixed issue. The issue came from data.frame with row.names, this isn't covered in unit tests, hence my bad. I will add this to the unit tests. |
|
closing this ticket as branch |
#41 request for column name not to be converted to lower case
Issue Description
Here's another one:
When creating new columns with, e.g., dplyr's mutate, the column names are forced to lower case. This happens silently and deviates from the 'default' behaviour of dplyr (at least with the other DBI-backends I've been using).
With the previously implemented quoting of column names, forcing lower case is not necessary, and could be removed.
Reproducible Example
Example:
This leads to the error:
I think this is a bit unexpected.
If I'm not missing something, the 'tolower' part from line
RAthena/R/DataTypes.R
Line 21 in 45fc753
could be removed and everything would still work OK and the user would get what was requested.
What do you think?
p.s. One would still get surprises when using copy_to with upper-case column names. Athena seems to accept quoted upper case letters in the DDL, but replaces them with lower case automatically, so this is not something that can be helped in RAthena. Still, I think this is a separate issue.