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

Escaping illegal characters allowed in HBase and disallowed in Hive DDL

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.1.1
    • None
    • HBase Handler
    • 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

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

            Dates

              Created:
              Updated: