[
https://issues.apache.org/jira/browse/PHOENIX-2196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14737027#comment-14737027
]
Josh Mahonin commented on PHOENIX-2196:
---------------------------------------
I spent a bit of time looking at the table name normalization, but I'm not sure
what the best direction to go with this is.
Today the API supports specifying your own schema and table name, and supports
lower cased table names:
https://github.com/apache/phoenix/blob/master/phoenix-spark/src/it/scala/org/apache/phoenix/spark/PhoenixSparkIT.scala#L141
https://github.com/apache/phoenix/blob/master/phoenix-spark/src/it/scala/org/apache/phoenix/spark/PhoenixSparkIT.scala#L432
We could attempt to normalize the table name automatically if a schema isn't
specified, and try be smart about when schema names and escape characters are
present, but I'm worried about making it more convoluted than it needs to be,
as well as breaking existing functionality.
I'm definitely open to suggestions / patches. :)
> phoenix-spark should automatically convert DataFrame field names to all caps
> ----------------------------------------------------------------------------
>
> Key: PHOENIX-2196
> URL: https://issues.apache.org/jira/browse/PHOENIX-2196
> Project: Phoenix
> Issue Type: Improvement
> Reporter: Randy Gelhausen
> Assignee: Josh Mahonin
> Priority: Minor
> Attachments: PHOENIX-2196.patch
>
>
> phoenix-spark will fail to save a DF into a Phoenix table if the DataFrame's
> fields are not all capitalized. Since Phoenix internally capitalizes all
> column names, the DataFrame.save method should automatically capitalize DF
> field names as a convenience to the end user.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)