diff --git a/velox/docs/functions/spark/datetime.rst b/velox/docs/functions/spark/datetime.rst index a4908cdcf420..62c56c10f0ef 100644 --- a/velox/docs/functions/spark/datetime.rst +++ b/velox/docs/functions/spark/datetime.rst @@ -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. :: diff --git a/velox/functions/sparksql/DateTimeFunctions.cpp b/velox/functions/sparksql/DateTimeFunctions.cpp index 2b87505fd626..966dea60b632 100644 --- a/velox/functions/sparksql/DateTimeFunctions.cpp +++ b/velox/functions/sparksql/DateTimeFunctions.cpp @@ -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);