You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by HyukjinKwon <gi...@git.apache.org> on 2017/05/06 21:04:55 UTC

[GitHub] spark pull request #17801: [MINOR][SQL][DOCS] Improve unix_timestamp's scala...

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

    https://github.com/apache/spark/pull/17801#discussion_r115128766
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/functions.scala ---
    @@ -2657,22 +2661,27 @@ object functions {
     
       /**
        * Converts time string in format yyyy-MM-dd HH:mm:ss to Unix timestamp (in seconds),
    -   * using the default timezone and the default locale, return null if fail.
    +   * using the default timezone and the default locale.
    +   * Returns `null` if fails.
    +   *
        * @group datetime_funcs
        * @since 1.5.0
        */
       def unix_timestamp(s: Column): Column = withExpr {
         UnixTimestamp(s.expr, Literal("yyyy-MM-dd HH:mm:ss"))
       }
     
    +  // scalastyle:off line.size.limit
       /**
    -   * Convert time string with given pattern
    -   * (see [http://docs.oracle.com/javase/tutorial/i18n/format/simpleDateFormat.html])
    -   * to Unix time stamp (in seconds), return null if fail.
    +   * Converts time string with given pattern to Unix timestamp (in seconds).
    +   * Returns `null` if fails.
    +   *
    +   * @see <a href="http://docs.oracle.com/javase/tutorial/i18n/format/simpleDateFormat.html">Customizing Formats</a>
    --- End diff --
    
    ```
    @see <a href="http://docs.oracle.com/javase/tutorial/i18n/format/simpleDateFormat.html">
    Customizing Formats</a>
    ```
    
    Given my past try, the above one works - https://github.com/apache/spark/pull/15999#discussion_r89456806 (IIRC, I checked the output).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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