Uploaded image for project: 'HCatalog'
  1. HCatalog
  2. HCATALOG-475

Partitioned columns are always returned as type STRING regardless of defined type

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.4
    • None
    • mapreduce
    • None

    Description

      When querying tables partitioned on non-string columns, the value returned from hcatalog is always string. For example, given the following table:

      create table part_int (
      c1 int,
      c2 string
      partitioned by (c_part int)
      row format delimited
      fields terminated by ','
      collection items terminated by '|'
      map keys terminated by '^'
      lines terminated by '\n';
      ;

      When reading from the table, inspecting the HCatRecord that comes back shows the following object types:

      java.lang.Integer
      java.lang.String
      java.lang.String

      This happens either with or without an explicitly provided output schema.

      Attachments

        Activity

          People

            Unassigned Unassigned
            scottgray Scott Gray
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: