Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-227

Extend extract function to support DateTime data types

Rank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersConvert to sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • None

    Description

      Currently extract() function only supports extracting time units from an Interval data type. This patch extends the extract() function to support DateTime.

      In StandardConvertletTable() we reinterpret the extract() function to be a '/' expression based on the input data types. The problem is for Drill we cannot rewrite the extract() function this early because the data types are still 'ANY' and we cannot determine the multiplier to be used in the '/' expression while rewriting it.

      Drill will extend the StandardConvertletTable() and override the convertExtract() method to simply treat it like a regular function and not rewrite it.

      ---------------- Imported from GitHub ----------------
      Url: https://github.com/julianhyde/optiq/pull/227
      Created by: mehant
      Labels:
      Created at: Wed Apr 02 23:57:46 CEST 2014
      State: closed

      Attachments

        Activity

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

          People

            Unassigned Unassigned
            github-import GitHub Import
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment