You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Reynold Xin (JIRA)" <ji...@apache.org> on 2015/07/20 02:34:04 UTC

[jira] [Commented] (SPARK-4551) Allow auto-conversion of field names of case class from camelCase to lower_case convention

    [ https://issues.apache.org/jira/browse/SPARK-4551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14632997#comment-14632997 ] 

Reynold Xin commented on SPARK-4551:
------------------------------------

[~huangjs] while this might be useful in a small number of cases, I think it complicates the design more and could also lead to more confusing behavior for users (imagine somebody asking on the mailing list "why are you changing my column names?").

Unless there is a compelling enough use case for it, it's best not to do this one. 

(I'm going to close it for now. We can always reopen if new evidence/argument surface.)

> Allow auto-conversion of field names of case class from camelCase to lower_case convention
> ------------------------------------------------------------------------------------------
>
>                 Key: SPARK-4551
>                 URL: https://issues.apache.org/jira/browse/SPARK-4551
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 1.3.0
>            Reporter: Jianshi Huang
>            Priority: Minor
>
> In SQL, lower_case is the naming convention for column names. 
> We want to keep this convention as much as possible. So when converting a RDD[case class] to SchemaRDD, let's make it an option to convert the filed names from camelCase to lower_case (e.g. unitAmount => unit_amount)
> My proposal:
> 1) Utility function for case conversion (e.g. https://gist.github.com/sidharthkuruvila/3154845)'
> 2) Add option convertToLowerCase to registerTempTable
>   def registerTempTable(tableName: String, convertToLowerCase = false)
> Jianshi



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org