Skip to content

Commit

Permalink
Fix(snowflake): allow 2nd argument in initcap (#1670)
Browse files Browse the repository at this point in the history
  • Loading branch information
georgesittas authored May 22, 2023
1 parent 64fdca4 commit 129931b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sqlglot/expressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3931,7 +3931,7 @@ class IfNull(Func):


class Initcap(Func):
pass
arg_types = {"this": True, "expression": False}


class JSONKeyValue(Expression):
Expand Down
1 change: 1 addition & 0 deletions tests/dialects/test_snowflake.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ class TestSnowflake(Validator):
dialect = "snowflake"

def test_snowflake(self):
self.validate_identity("INITCAP('iqamqinterestedqinqthisqtopic', 'q')")
self.validate_identity("CAST(x AS GEOMETRY)")
self.validate_identity("OBJECT_CONSTRUCT(*)")
self.validate_identity("SELECT TO_DATE('2019-02-28') + INTERVAL '1 day, 1 year'")
Expand Down

0 comments on commit 129931b

Please sign in to comment.