Skip to content

Commit

Permalink
Fix: hive dialect hierarchy has no CURRENT_TIME func (#4264)
Browse files Browse the repository at this point in the history
  • Loading branch information
georgesittas authored Oct 17, 2024
1 parent 8f49ad8 commit 83167ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sqlglot/dialects/hive.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,9 @@ class Parser(parser.Parser):
"TRANSFORM": lambda self: self._parse_transform(),
}

NO_PAREN_FUNCTIONS = parser.Parser.NO_PAREN_FUNCTIONS.copy()
NO_PAREN_FUNCTIONS.pop(TokenType.CURRENT_TIME)

PROPERTY_PARSERS = {
**parser.Parser.PROPERTY_PARSERS,
"SERDEPROPERTIES": lambda self: exp.SerdeProperties(
Expand Down
1 change: 1 addition & 0 deletions tests/dialects/test_databricks.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class TestDatabricks(Validator):
dialect = "databricks"

def test_databricks(self):
self.validate_identity("SELECT t.current_time FROM t")
self.validate_identity("ALTER TABLE labels ADD COLUMN label_score FLOAT")
self.validate_identity("DESCRIBE HISTORY a.b")
self.validate_identity("DESCRIBE history.tbl")
Expand Down

0 comments on commit 83167ea

Please sign in to comment.