You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/09/15 20:39:39 UTC

[GitHub] [spark] dongjoon-hyun commented on a change in pull request #29761: [SPARK-32889][SQL] orc table column name supports special characters.

dongjoon-hyun commented on a change in pull request #29761:
URL: https://github.com/apache/spark/pull/29761#discussion_r488959353



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcFileFormat.scala
##########
@@ -38,14 +38,19 @@ import org.apache.spark.sql.catalyst.InternalRow
 import org.apache.spark.sql.catalyst.expressions._
 import org.apache.spark.sql.catalyst.expressions.codegen.GenerateUnsafeProjection
 import org.apache.spark.sql.execution.datasources._
+import org.apache.spark.sql.internal.SQLConf
 import org.apache.spark.sql.sources._
 import org.apache.spark.sql.types._
 import org.apache.spark.util.{SerializableConfiguration, Utils}
 
 private[sql] object OrcFileFormat {
   private def checkFieldName(name: String): Unit = {
     try {
-      TypeDescription.fromString(s"struct<$name:int>")
+      if (SQLConf.get.getConfString("spark.sql.orc.column.allowSpecialChar", "false").toBoolean) {

Review comment:
       Thank you for your contribution, @jzc928 . 
   In this case, I believe we don't need to add a new configuration like `spark.sql.orc.column.allowSpecialChar`.




----------------------------------------------------------------
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:
users@infra.apache.org



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