Hive
  1. Hive
  2. HIVE-2826

ALTER VIEW ADD (IF NOT EXISTS) PARTITION syntax is bad.

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      The syntax, ALTER TABLE x ADD IF NOT EXISTS PARTITION, puts the "IF NOT EXISTS" before the subject of the statement. Not only is this weird grammar, but it is also inconsistent with other uses of "IF NOT EXISTS", for example, "CREATE TABLE IF NOT EXISTS" and "DROP TABLE IF EXISTS".

      It would be a minor improvement to align the syntaxes.

        Activity

        Hide
        Adam Kramer added a comment -

        Also, it is implemented for views, too.

        Show
        Adam Kramer added a comment - Also, it is implemented for views, too.
        Hide
        Adam Kramer added a comment -

        Ugh, sorry. The weird difference in syntax is what made me think this had not been implemented.

        Show
        Adam Kramer added a comment - Ugh, sorry. The weird difference in syntax is what made me think this had not been implemented.

          People

          • Assignee:
            Unassigned
            Reporter:
            Adam Kramer
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development