Github user chenghao-intel commented on a diff in the pull request: https://github.com/apache/spark/pull/5798#discussion_r29406841 --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveResolutionSuite.scala --- @@ -81,9 +81,13 @@ class HiveResolutionSuite extends HiveComparisonTest { .toDF().registerTempTable("caseSensitivityTest") val query = sql("SELECT a, b, A, B, n.a, n.b, n.A, n.B FROM caseSensitivityTest") - assert(query.schema.fields.map(_.name) === Seq("a", "b", "A", "B", "a", "b", "A", "B"), + assert(query.schema.fields.map(_.name) === Seq("a", "b", "a", "b", "a", "b", "a", "b"), "The output schema did not preserve the case of the query.") --- End diff -- In Hive ``` hive> create table ddDD as select Key, valUe from src; hive> desc extended dddd; OK key string value string Detailed Table Information Table(tableName:dddd, dbName:default, owner:hcheng, createTime:1430368423, lastAccessTime:0, retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:key, type:string, comment:null), FieldSchema(name:value, type:string, comment:null)], location:file:/home/hcheng/warehouse/dddd, inputFormat:org.apache.hadoop.mapred.TextInputFormat, outputFormat:org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat, compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, parameters:{serialization.format=1}), bucketCols:[], sortCols:[], parameters:{}, skewedInfo:SkewedInfo(skewedColNames:[], skewedColValues:[], skewedColValueLocationMaps:{}), storedAsSubDirectories:false), partitionKeys:[], parameters:{numFiles=1, COLUMN_STATS_ACCURATE=true, transient_lastDdlTime=1430368423, numRows=0, totalSize=5824, rawDataSize=0}, viewOriginalText:null, viewExpandedText:null, tableType:MANAGED_TABLE) Time taken: 0.111 seconds, Fetched: 4 row(s) ``` You will see both table name & column names are normalized (to lower case), so I think it's probably not necessary for the preservation (Normalized name is what we want, doesn't it?)
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org