Skip to content

Hive ALTER VIEW unparsable #6476

@mrebaker

Description

@mrebaker

Search before asking

  • I searched the issues and found no similar issues.

What Happened

SQLfluff fails to parse ALTER VIEW queries, despite being supported by Hive - see docs.

Failures happen for both ALTER VIEW... AS SELECT... and ALTER VIEW ... SET TBLPROPERTIES... queries.

Expected Behaviour

This should be parsed without any failures.

Observed Behaviour

==== parsing violations ====
L:   1 | P:   1 |  PRS | Line 1, Position 1: Found unparsable section: 'ALTER VIEW foo AS
                       | SELECT col1 FROM bar;'

How to reproduce

echo 'ALTER VIEW foo AS SELECT col1 FROM bar;' | sqlfluff parse --dialect=hive -

Dialect

Hive

Version

sqlfluff, version 3.2.5
Python 3.10

Configuration

[sqlfluff]
dialect = hive

Are you willing to work on and submit a PR to address the issue?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghiveIssue relating to the Apache Hive dialect

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions