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

    https://github.com/apache/spark/pull/11936#discussion_r57468288
  
    --- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/orc/OrcRelation.scala ---
    @@ -291,10 +308,10 @@ private[orc] case class OrcTableScan(
         val orcFormat = new DefaultSource
         val dataSchema =
           orcFormat
    -          .inferSchema(sqlContext, Map.empty, inputPaths)
    -          .getOrElse(sys.error("Failed to read schema from target ORC 
files."))
    +        .inferSchema(sqlContext, Map.empty, inputPaths)
    +        .getOrElse(sys.error("Failed to read schema from target ORC 
files."))
         // Sets requested columns
    -    addColumnIds(dataSchema, attributes, conf)
    +    OrcRelation.setRequiredColumns(conf, dataSchema, 
StructType.fromAttributes(attributes))
    --- End diff --
    
    Explain this change?


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