cloud-fan commented on code in PR #48986:
URL: https://github.com/apache/spark/pull/48986#discussion_r1888288525
##########
sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveUtils.scala:
##########
@@ -221,6 +221,15 @@ private[spark] object HiveUtils extends Logging {
.booleanConf
.createWithDefault(true)
+ val QUOTE_HIVE_STRUCT_FIELD_NAME =
+ buildConf("spark.sql.hive.quoteHiveStructFieldName")
+ .doc("When true, for a column defined in struct type, when it contains
special characters " +
+ "in the field name, Spark will quote it for verification. E.g.
struct<x:int,y.z:int>" +
+ " is read as struct<`x`:int,`y.z`:int> for verification.")
+ .version("4.0.0")
+ .booleanConf
+ .createWithDefault(false)
Review Comment:
I think there are two things here:
1. support reading Hive tables with special chars in the column name
2. support creating hive-compatible tables with special chars in the column
name
1 is always safe to do, but 2 need a flag because it may break compatibility.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]