You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/12/04 02:11:38 UTC

[GitHub] [spark] nchammas opened a new pull request #26755: [SPARK-30113][SQL][Python] Expose mergeSchema option in PySpark's ORC APIs

nchammas opened a new pull request #26755: [SPARK-30113][SQL][Python] Expose mergeSchema option in PySpark's ORC APIs
URL: https://github.com/apache/spark/pull/26755
 
 
   ### What changes were proposed in this pull request?
   
   This PR is a follow-up to #24043 and cousin of #26730. It exposes the `mergeSchema` option directly in the ORC APIs.
   
   ### Why are the changes needed?
   
   So the Python API matches the Scala API.
   
   ### Does this PR introduce any user-facing change?
   
   Yes, it adds a new option directly in the ORC reader method signatures.
   
   ### How was this patch tested?
   
   I tested this manually as follows:
   
   ```
   >>> spark.range(3).write.orc('test-orc')
   >>> spark.range(3).withColumnRenamed('id', 'name').write.orc('test-orc/nested')
   >>> spark.read.orc('test-orc', recursiveFileLookup=True, mergeSchema=True)
   DataFrame[id: bigint, name: bigint]
   >>> spark.read.orc('test-orc', recursiveFileLookup=True, mergeSchema=False)
   DataFrame[id: bigint]
   >>> spark.conf.set('spark.sql.orc.mergeSchema', True)
   >>> spark.read.orc('test-orc', recursiveFileLookup=True)
   DataFrame[id: bigint, name: bigint]
   >>> spark.read.orc('test-orc', recursiveFileLookup=True, mergeSchema=False)
   DataFrame[id: bigint]
   ```

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org