GitHub user maropu opened a pull request:

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

    [SPARK-24673][SQL][PYTHON][FOLLOWUP] Support column types in timezone of 
to_utc_timestamp

    ## What changes were proposed in this pull request?
    This pr supported column types in timezone of `to_utc_timestamp` (follow-up 
of #21693).
    
    ## How was this patch tested?
    Manually checked;
    ```
    >>> df = sc.parallelize([('2017-07-14 02:40:00.0', 'JST'), ('2017-07-14 
02:40:00.0', 'PST')]).toDF(['ts', 'tz'])
    >>> df.select(to_utc_timestamp(df['ts'], lit('JST'))).show()
    +-------------------------+
    |to_utc_timestamp(ts, JST)|
    +-------------------------+
    |      2017-07-13 17:40:00|
    |      2017-07-13 17:40:00|
    +-------------------------+
    
    >>> df.select(to_utc_timestamp(df['ts'], lit('PST'))).show()
    +-------------------------+
    |to_utc_timestamp(ts, PST)|
    +-------------------------+
    |      2017-07-14 09:40:00|
    |      2017-07-14 09:40:00|
    +-------------------------+
    
    >>> df.select(to_utc_timestamp(df['ts'], df['tz'])).show()
    +------------------------+
    |to_utc_timestamp(ts, tz)|
    +------------------------+
    |     2017-07-13 17:40:00|
    |     2017-07-14 09:40:00|
    +------------------------+
    ```

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

    $ git pull https://github.com/maropu/spark SPARK-24673-FOLLOWUP

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

    https://github.com/apache/spark/pull/21723.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 #21723
    
----
commit dfb5312819957938f7be2510035bd2755c4b222a
Author: Takeshi Yamamuro <yamamuro@...>
Date:   2018-07-06T06:19:28Z

    Fix

----


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to