Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
marin-ma committed Feb 27, 2024
1 parent 5376111 commit 0902503
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 2 additions & 4 deletions velox/docs/functions/spark/datetime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,8 @@ These functions support TIMESTAMP and DATE input types.
Create timestamp from ``year``, ``month``, ``day``, ``hour``, ``min`` and ``sec`` fields.
If the ``timezone`` parameter is provided,
the function interprets the input time components as being in the specified ``timezone``.
Otherwise if ``session_timezone`` is configured,
the function assumes the inputs are in the session's configured time zone.
If neither the ``timezone`` parameter nor the ``session_timezone`` configuration is specified,
an exception will be thrown.
Otherwise the function assumes the inputs are in the session's configured time zone.
Requires ``session_timezone`` to be set, or an exceptions will be thrown.

Returns the timestamp adjusted to the GMT time zone. ::

Expand Down
3 changes: 1 addition & 2 deletions velox/functions/sparksql/DateTimeFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,7 @@ class MakeTimestampFunction : public exec::VectorFunction {
});
}
} else {
// Otherwise use session timezone. If session timezone is not specified,
// use default value 0(UTC timezone).
// Otherwise use session timezone.
rows.applyToSelected([&](vector_size_t row) {
auto timestamp = makeTimeStampFromDecodedArgs(
row, year, month, day, hour, minute, micros);
Expand Down

0 comments on commit 0902503

Please sign in to comment.