Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-4549

Add support for more truncation units in date_trunc function

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.6.0
    • 1.7.0
    • None
    • None

    Description

      Currently we support only YEAR, MONTH, DAY, HOUR, MINUTE, SECOND truncate units for types TIME, TIMESTAMP and DATE. Extend the functions to support YEAR, MONTH, DAY, HOUR, MINUTE, SECOND, WEEK, QUARTER, DECADE, CENTURY, MILLENNIUM truncate units for types TIME, TIMESTAMP, DATE, INTERVAL DAY, INTERVAL YEAR.

      Also get rid of the if-and-else (on truncation unit) implementation. Instead resolve to a direct function based on the truncation unit in Calcite -> Drill (DrillOptiq) expression conversion.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            vkorukanti Venki Korukanti
            vkorukanti Venki Korukanti
            Khurram Faraaz Khurram Faraaz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment