Skip to content

parse error on redshift current_timestamp #3573

@PBalsdon

Description

@PBalsdon

Search before asking

  • I searched the issues and found no similar issues.

What Happened

A line in our code is WHERE added_at <= CURRENT_TIMESTAMP. This throws a parse error. The error goes away if I add () to the end, WHERE added_at <= CURRENT_TIMESTAMP()

Expected Behaviour

This should parse normally irrespective of if () is at the end.

Observed Behaviour

Parse error

How to reproduce

Use the CURRENT_TIMESTAMP function under redshift dialect.

Dialect

Redshift

Version

sqlfluff, version 1.1.0
Python 3.9.13

Configuration

.sqlfluff

[sqlfluff]
dialect = redshift
exclude_rules = L034, L035

[sqlfluff:indentation]
indented_joins = false
indented_using_on = true
indented_on_contents = false


[sqlfluff:rules:L003]
indent_unit = space
tab_space_size = 4

[sqlfluff:rules:L010]
capitalisation_policy = upper

[sqlfluff:rules:L016]
max_line_length = 120
indent_unit = space
tab_space_size = 4

[sqlfluff:rules:L030]
extended_capitalisation_policy = upper

[sqlfluff:rules:L038]
select_clause_trailing_comma = forbid

[sqlfluff:rules:L040]
capitalisation_policy = upper

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 workinggood first issueGood for newcomersredshiftIssues relating to Amazon Redshift dialect

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions