databend icon indicating copy to clipboard operation
databend copied to clipboard

bug: SELECT statement with named columns returns lowercased for quoted columns

Open inviscid opened this issue 1 year ago • 0 comments

Search before asking

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

A related bug perhaps: https://github.com/datafuselabs/databend/issues/14205

Version

v1.2.344

What's Wrong?

Result column names are different depending on how the SELECT statement is constructed.

How to Reproduce?

A SELECT * FROM some_table; will return quoted column names as they are quoted in a case senstive format.

A SELECT "MyCase!SensitiveColumn" FROM some_table; will return the column name as mycase!sensitivecolumn in all lowercase instead of the expected quoted name.

Using the AS directive will return the specified name in a case sensitive manner as expected though. SELECT "MyCase!SensitiveColumn" AS "MyCase!SensitiveColumn" FROM some_table; returns the result with MyCase!SensitiveColumn for the column name.

Are you willing to submit PR?

  • [ ] Yes I am willing to submit a PR!

inviscid avatar Feb 26 '24 17:02 inviscid