Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-4160 Vectorized Query Execution in Hive
  3. HIVE-4821

Implement vectorized type casting for all types

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.13.0
    • Fix Version/s: 0.13.0
    • Component/s: None
    • Labels:
      None

      Description

      Implement vectorized support for casting from any type to any type.

      From the documentation:

      cast(expr as <type>): Converts the results of the expression expr to <type> e.g. cast('1' as BIGINT) will convert the string '1' to it integral representation. A null is returned if the conversion does not succeed

      The current supported internal types are:

      LONG
      DOUBLE
      STRING
      TIMESTAMP

      Before implementation, determine what are the semantics of explicit casting to types less general than the internal types. E.g. what if you cast DOUBLE to TINYINT? Can we just cast internally to LONG and let the output process cast to TINYINT?

      This JIRA includes all work to make casting operate end-to-end in a SQL query in vectorized mode, including updates to VectorizationContext.

        Attachments

        1. HIVE-4821.2.patch
          37 kB
          Eric N. Hanson

          Activity

            People

            • Assignee:
              ehans Eric N. Hanson
              Reporter:
              ehans Eric N. Hanson
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: