Skip to content

bug: When case sensitivity is enabled, some system functions cannot be used #16737

Closed
@cdmikechen

Description

@cdmikechen

Search before asking

  • I had searched in the issues and found no similar issues.

Version

v1.2.642-nightly

What's Wrong?

The version function cannot be used after unquoted_ident_case_sensitive is set to the global configuration.

SELECT VERSION() :

(databend_sqlalchemy.errors.Error) Code: None. APIError: ResponseError with 1008: error:
  --> SQL:1:8
  |
1 | SELECT VERSION()
  |        ^^^^^^^^^ no function matches the given name: 'VERSION', do you mean 'version', 'haversine'?
[SQL: SELECT VERSION()]
(Background on this error at: https://sqlalche.me/e/14/dbapi)

SELECT currentDatabase() :

(databend_sqlalchemy.errors.Error) Code: None. APIError: ResponseError with 1008: error:
  --> SQL:1:8
  |
1 | SELECT currentDatabase()
  |        ^^^^^^^^^^^^^^^^^ no function matches the given name: 'currentDatabase', do you mean 'currentdatabase', 'current_database', 'currentuser', 'current_user', 'current_role', 'current_timestamp'?

In my understanding, case sensitivity should only be applied to user-created table names and field names, and system functions should not need this criterion.

How to Reproduce?

SET GLOBAL unquoted_ident_case_sensitive=1;
SELECT VERSION();

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: something isn't workinggood first issueCategory: good first issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions