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

    https://github.com/apache/spark/pull/758#discussion_r12598965
  
    --- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/hiveOperators.scala ---
    @@ -102,16 +105,55 @@ case class HiveTableScan(
               .getOrElse(sys.error(s"Can't find attribute $a"))
             (row: Any, _: Array[String]) => {
               val data = objectInspector.getStructFieldData(row, ref)
    -          unwrapData(data, ref.getFieldObjectInspector)
    +          unwrapHiveData(unwrapData(data, ref.getFieldObjectInspector))
             }
           }
         }
       }
     
    +  private def unwrapHiveData(value: Any) = value match {
    +    case maybeNull: String if maybeNull.toLowerCase == "null" => null
    --- End diff --
    
    Would it be possible to calculate the required unwrapping statically based 
on the object inspector instead of doing this match for every data item?


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

Reply via email to