GitHub user MaxGekk opened a pull request:

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

    [SPARK-26243][SQL] Use java.time API for parsing timestamps and dates from 
JSON

    ## What changes were proposed in this pull request?
    
    In the PR, I propose to switch on **java.time API** for parsing timestamps 
and dates from JSON inputs with microseconds precision. The SQL config 
`spark.sql.legacy.timeParser.enabled` allow to switch back to previous behavior 
with using `java.text.SimpleDateFormat`/`FastDateFormat` for parsing/generating 
timestamps/dates.
    
    ## How was this patch tested?
    
    It was tested by `JsonExpressionsSuite`, `JsonFunctionsSuite` and 
`JsonSuite`.

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

    $ git pull https://github.com/MaxGekk/spark-1 json-time-parser

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

    https://github.com/apache/spark/pull/23196.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 #23196
    
----
commit fb10b91502b67b98f2904a06b017a6e56dd6e39f
Author: Maxim Gekk <maxim.gekk@...>
Date:   2018-12-01T11:01:47Z

    Adding DateTimeFormatter

commit a9b39eccfdc3bd9da8fe52eda24ed240588b282f
Author: Maxim Gekk <maxim.gekk@...>
Date:   2018-12-01T11:15:31Z

    Support DateTimeFormatter by JacksonParser and JacksonGenerator

commit ff589f505f7aaa8c94ce304aaf77792505998c16
Author: Maxim Gekk <maxim.gekk@...>
Date:   2018-12-01T12:31:43Z

    Make test independent from current time zone

commit 4646dededae832185a35a85244baab6507d28f0d
Author: Maxim Gekk <maxim.gekk@...>
Date:   2018-12-01T18:19:31Z

    Fix a test by new fallback

----


---

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

Reply via email to