GitHub user lindblombr opened a pull request:

    https://github.com/apache/spark/pull/21847

    [SPARK-24855][SQL][EXTERNAL][WIP]: Built-in AVRO support should support 
specified schema on write

    ## What changes were proposed in this pull request?
    
    Allows `avroSchema` option to be specified on write, allowing a user to 
specify a schema in cases where this is required.  A trivial use case is 
reading in an avro dataset, making some small adjustment to a column or columns 
and writing out using the same schema.  Implicit schema creation from SQL 
Struct results in a schema that while for the most part, is functionally 
similar, is not necessarily compatible.
    
    Allows `fixed` Field type to be utilized for records of specified 
`avroSchema`
    
    ## How was this patch tested?
    
    Unit tests in AvroSuite are extended to write out included sample datasets 
using new `avroSchema` option and verify readability of records.  Ideally, 
tests should be added for each `Schema.Type` to ensure records are written with 
full fidelity.
    
    Please review http://spark.apache.org/contributing.html before opening a 
pull request.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/lindblombr/spark specify_schema_on_write

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/21847.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #21847
    
----
commit 30fc1ae98a2c29824b83e956c2cbe87e9bbb3749
Author: Brian Lindblom <blindblom@...>
Date:   2018-07-21T20:43:26Z

    SPARK-24855: Built-in AVRO support should support specified schema on write

----


---

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

Reply via email to