Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-294

Need "str_to_map" built-in function which is supported in Hive

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Minor
    • Resolution: Not A Bug
    • Affects Version/s: Impala 0.7
    • Fix Version/s: Product Backlog
    • Component/s: None
    • Environment:
      any

      Description

      The built-in function "str_to_map" is not supported yet.
      To add this feature, MAP type should be added first.

      The functional spec of str_to_map is like below.

      • Return Type : map<string,string>
      • Name(Signature) : str_to_map(text[, delimiter1, delimiter2])
      • Description : Splits text into key-value pairs using two delimiters. Delimiter1 separates text into K-V pairs, and Delimiter2 splits each K-V pair. Default delimiters are ',' for delimiter1 and ':' for delimiter2.

      The following operator provide mechanism to access elements in Map type.

      • Operator : M[key]
      • Operand types : M is a Map<K, V> and key has type K
      • Description : Returns the value corresponding to the key in the map e.g. if M is a map comprising of {'f' -> 'foo', 'b' -> 'bar', 'all' -> 'foobar'}

        then M['all'] returns 'foobar'

        Attachments

        1. IMPALA-294-0.7-temp.patch
          5 kB
          Jordan Lee

          Activity

            People

            • Assignee:
              nong_impala_60e1 Nong Li
              Reporter:
              izlley_impala_013b Jordan Lee
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: