AngersZhuuuu commented on a change in pull request #29421:
URL: https://github.com/apache/spark/pull/29421#discussion_r469918794



##########
File path: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/HiveScriptTransformationExec.scala
##########
@@ -274,6 +275,14 @@ object HiveScriptIOSchema extends HiveInspectors {
     var propsMap = serdeProps.toMap + (serdeConstants.LIST_COLUMNS -> 
columns.mkString(","))
     propsMap = propsMap + (serdeConstants.LIST_COLUMN_TYPES -> 
columnTypesNames)
 
+    if 
(!propsMap.contains(serdeConstants.SERIALIZATION_LAST_COLUMN_TAKES_REST)) {
+      val schemaProps = AnnotationUtils.getAnnotation(serde.getClass, 
classOf[SerDeSpec])
+      if (schemaProps != null &&
+        
schemaProps.schemaProps().contains(serdeConstants.SERIALIZATION_LAST_COLUMN_TAKES_REST))
 {
+        propsMap = propsMap + 
(serdeConstants.SERIALIZATION_LAST_COLUMN_TAKES_REST -> "true")
+      }
+    }

Review comment:
       > This code to handle the schemaless case is the same with hive?
   
   No, since when hive plan query, it will set this config.
   I think to keep same behavior with hive is ok




----------------------------------------------------------------
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