jzc928 opened a new pull request #29761:
URL: https://github.com/apache/spark/pull/29761


   ### What changes were proposed in this pull request?
   make orc table column name support special characters like `$`
   
   ### Why are the changes needed?
   Special characters like `$` are allowed in orc table column name by Hive.
   But it's error when execute command "CREATE TABLE tbl(`$` INT, b INT) using 
orc" in spark. it's not compatible with Hive.
   
   `Column name "$" contains invalid character(s). Please use alias to rename 
it.;Column name "$" contains invalid character(s). Please use alias to rename 
it.;org.apache.spark.sql.AnalysisException: Column name "$" contains invalid 
character(s). Please use alias to rename it.; 
   at 
org.apache.spark.sql.execution.datasources.orc.OrcFileFormat$.checkFieldName(OrcFileFormat.scala:51)
 
   at 
org.apache.spark.sql.execution.datasources.orc.OrcFileFormat$.$anonfun$checkFieldNames$1(OrcFileFormat.scala:59)
 
   at 
org.apache.spark.sql.execution.datasources.orc.OrcFileFormat$.$anonfun$checkFieldNames$1$adapted(OrcFileFormat.scala:59)
 
   at 
scala.collection.IndexedSeqOptimized.foreach(IndexedSeqOptimized.scala:36) 
   at 
scala.collection.IndexedSeqOptimized.foreach$(IndexedSeqOptimized.scala:33) 
   at scala.collection.mutable.WrappedArray.foreach(WrappedArray.scala:38) `
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   ### How was this patch tested?
   Add unit test
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to