Github user liancheng commented on a diff in the pull request:

    https://github.com/apache/spark/pull/8597#discussion_r38742310
  
    --- Diff: 
sql/hive/src/test/scala/org/apache/spark/sql/sources/SimpleTextRelation.scala 
---
    @@ -112,11 +114,14 @@ class SimpleTextRelation(
         val fields = dataSchema.map(_.dataType)
     
         sparkContext.textFile(inputStatuses.map(_.getPath).mkString(",")).map 
{ record =>
    -      Row(record.split(",").zip(fields).map { case (value, dataType) =>
    +      Row(record.split(",", -1).zip(fields).map { case (v, dataType) =>
    +        val value = if (v == "") null else v
             // `Cast`ed values are always of Catalyst types (i.e. UTF8String 
instead of String, etc.)
             val catalystValue = Cast(Literal(value), dataType).eval()
             // Here we're converting Catalyst values to Scala values to test 
`needsConversion`
    -        CatalystTypeConverters.convertToScala(catalystValue, dataType)
    +        val scalaV = CatalystTypeConverters.convertToScala(catalystValue, 
dataType)
    +
    +        scalaV
    --- End diff --
    
    Nit: Remove `scalaV`?


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to