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

HMS on Oracle incompatibility

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.0.0
    • Metastore
    • None
    • Oracle as metastore DB

    • Hide
      Introduces a new hive-site.xml parameter : "hive.metastore.orm.retrieveMapNullsAsEmptyStrings" that defaults to false.
      For operation with oracle, or any other datastore that converts empty strings to nulls, users should set this to true.

      If this parameter is set to true, ObjectStore will transform any null map values it finds in any of the parameters maps to "".
      If this parameter is set to false, ObjectStore will prune any map entry where the value is null.
      Show
      Introduces a new hive-site.xml parameter : "hive.metastore.orm.retrieveMapNullsAsEmptyStrings" that defaults to false. For operation with oracle, or any other datastore that converts empty strings to nulls, users should set this to true. If this parameter is set to true, ObjectStore will transform any null map values it finds in any of the parameters maps to "". If this parameter is set to false, ObjectStore will prune any map entry where the value is null.

    Description

      Oracle does not distinguish between empty strings and NULL,which proves problematic for DataNucleus.
      In the event a user creates a table with some property stored as an empty string the table will no longer be accessible.
      i.e. TBLPROPERTIES ('serialization.null.format'='')
      If they try to select, describe, drop, etc the client prints the following exception.
      ERROR ql.Driver: FAILED: SemanticException [Error 10001]: Table not found <table name>
      The work around for this was to go into the hive metastore on the Oracle database and replace NULL with some other string. Users could then drop the tables or alter their data to use the new null format they just set.

      Attachments

        1. HIVE-8485.2.patch
          10 kB
          Sushanth Sowmyan
        2. HIVE-8485.patch
          10 kB
          Sushanth Sowmyan

        Issue Links

          Activity

            People

              sushanth Sushanth Sowmyan
              rnpridgeon Ryan Pridgeon
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: