Skip to content

[FORMATTING] ClickHouse: keywordCase: upper breaks the case-sensitive range() function #980

Description

@JacobNWolf

Input data

SELECT range(32);

Options:

{
  "language": "clickhouse",
  "keywordCase": "upper"
}

Expected Output

SELECT
  range(32);

Actual Output

SELECT
  RANGE (32);

ClickHouse rejects this with:

Code: 46. DB::Exception: Function with name `RANGE` does not exist.
Maybe you meant: ['range','rand']. (UNKNOWN_FUNCTION)

Usage

  • Using the CLI:
    printf 'SELECT range(32);\n' |
      sql-formatter \
        --language clickhouse \
        --config '{"keywordCase":"upper"}'
  • SQL language: ClickHouse
  • SQL Formatter version: 15.8.2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions