Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-15838

Escaping illegal characters allowed in HBase and disallowed in Hive DDL

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.1.1
    • Fix Version/s: None
    • Component/s: HBase Handler
    • Labels:
      None

      Description

      In HBase it's possible to have table names such as:

      cf:one, cf:two , cf:three#i

      when creating an Hive table from HBase, such as:

      CREATE TABLE MyTable (key int, one string, two int, three int)
      STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
      WITH SERDEPROPERTIES (
      "hbase.columns.mapping" = ":key,cf:one#s,cf:two,cf:three#i",
      "hbase.table.default.storage.type" = "binary"
      );

      it fails, because '#s' and '#b' are reserved keywords to specify storage type in Hive, and in this case '#i' confuses the DDL.

      Anyway the '#' it's an allowed column name in HBase, and it would be possible to escape it without confusing the Hive DDL.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              dgesino Davide Gesino
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: