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

Extend extract function to support DateTime data types

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      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

            People

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

              Dates

              • Created:
                Updated:
                Resolved: