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

HiveLexer.allowQuotedId defaults incorrectly in the absence of hiveConf

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.1.0, 2.1.1, 2.2.0, 2.3.0, 2.3.1, 2.3.2
    • Fix Version/s: None
    • Component/s: Parser
    • Labels:
      None

      Description

      In HIVE-13101 a default was applied to prevent a null pointer exception when hiveConf is null due to ParseDriver.parse(command) being called without a Context parameter for a SQL command containing quoted identifiers. For example...

      CREATE TABLE `foo` (`bar` STRING)

      Unfortunately, this false default is the opposite behavior of what occurs when a Configuration is provided that does not contain an explicit value for the setting.

      The default for HiveConf.ConfVars.HIVE_QUOTEDID_SUPPORT is "column", which then returns true.

      Instead of shortcutting explicitly to false, the method should take the value from...

      HiveConf.ConfVars.HIVE_QUOTEDID_SUPPORT.getDefaultValue()

      ...and then apply the !"none".equals(...) check as normal.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              adamkennedy77 Adam Kennedy
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: