You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Maxim Gekk (JIRA)" <ji...@apache.org> on 2019/02/16 12:35:00 UTC

[jira] [Created] (SPARK-26900) Simplify truncation to quarter of year

Maxim Gekk created SPARK-26900:
----------------------------------

             Summary: Simplify truncation to quarter of year
                 Key: SPARK-26900
                 URL: https://issues.apache.org/jira/browse/SPARK-26900
             Project: Spark
          Issue Type: Improvement
          Components: SQL
    Affects Versions: 2.4.0
            Reporter: Maxim Gekk


Currently, truncation a timestamp to quarter of year is performed via truncation to month and separate quarter calculation. This can be done by directly truncating local date to quarter:
{code:java}
LocalDate firstDayOfQuarter = date.with(IsoFields.DAY_OF_QUARTER, 1L);
{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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