@@ -2491,10 +2491,10 @@ object functions {
2491
2491
* Converts a date/timestamp/string to a value of string in the format specified by the date
2492
2492
* format given by the second argument.
2493
2493
*
2494
- * A pattern could be for instance `dd.MM.yyyy` and could return a string like ' 18.03.1993'. All
2495
- * pattern letters of `java.text.SimpleDateFormat` can be used.
2494
+ * A pattern `dd.MM.yyyy` would return a string like ` 18.03.1993`.
2495
+ * All pattern letters of `java.text.SimpleDateFormat` can be used.
2496
2496
*
2497
- * @note Use when ever possible specialized functions like [[year ]]. These benefit from a
2497
+ * @note Use specialized functions like [[year ]] whenever possible as they benefit from a
2498
2498
* specialized implementation.
2499
2499
*
2500
2500
* @group datetime_funcs
@@ -2647,7 +2647,11 @@ object functions {
2647
2647
}
2648
2648
2649
2649
/**
2650
- * Gets current Unix timestamp in seconds.
2650
+ * Returns the current Unix timestamp (in seconds).
2651
+ *
2652
+ * @note All calls of `unix_timestamp` within the same query return the same value
2653
+ * (i.e. the current timestamp is calculated at the start of query evaluation).
2654
+ *
2651
2655
* @group datetime_funcs
2652
2656
* @since 1.5.0
2653
2657
*/
@@ -2657,7 +2661,9 @@ object functions {
2657
2661
2658
2662
/**
2659
2663
* Converts time string in format yyyy-MM-dd HH:mm:ss to Unix timestamp (in seconds),
2660
- * using the default timezone and the default locale, return null if fail.
2664
+ * using the default timezone and the default locale.
2665
+ * Returns `null` if fails.
2666
+ *
2661
2667
* @group datetime_funcs
2662
2668
* @since 1.5.0
2663
2669
*/
@@ -2666,13 +2672,15 @@ object functions {
2666
2672
}
2667
2673
2668
2674
/**
2669
- * Convert time string with given pattern
2670
- * (see [http://docs.oracle.com/javase/tutorial/i18n/format/simpleDateFormat.html])
2671
- * to Unix time stamp (in seconds), return null if fail.
2675
+ * Converts time string with given pattern to Unix timestamp (in seconds).
2676
+ * Returns `null` if fails.
2677
+ *
2678
+ * @see <a href="http://docs.oracle.com/javase/tutorial/i18n/format/simpleDateFormat.html">
2679
+ * Customizing Formats</a>
2672
2680
* @group datetime_funcs
2673
2681
* @since 1.5.0
2674
2682
*/
2675
- def unix_timestamp (s : Column , p : String ): Column = withExpr {UnixTimestamp (s.expr, Literal (p)) }
2683
+ def unix_timestamp (s : Column , p : String ): Column = withExpr { UnixTimestamp (s.expr, Literal (p)) }
2676
2684
2677
2685
/**
2678
2686
* Convert time string to a Unix timestamp (in seconds).
0 commit comments