databend icon indicating copy to clipboard operation
databend copied to clipboard

bug: string is identified as a column if enable planer_v2

Open FANNG1 opened this issue 2 years ago • 3 comments

Search before asking

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

Version

a65c8d332

What's Wrong?

string is identified as a column, if I disable planer_v2 or change "RUSSIA" to 'RUSSIA' , everthing is ok;

ERROR 1105 (HY000): Code: 1065, displayText = error:
  --> SQL:1:58
  |
1 | select * from hive.default.customer_p2 where c_nation2 = "RUSSIA"
  |                                                           ^^^^^^^^ column doesn't exist

How to Reproduce?

No response

Are you willing to submit PR?

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

FANNG1 avatar Aug 10 '22 02:08 FANNG1

Now databend uses single quote string as literal string as PG did. https://www.prisma.io/dataguide/postgresql/short-guides/quoting-rules

cc @leiysky is that any plan to make double quote string as literal string as MySQL did? I think it's ambiguous.

sundy-li avatar Aug 10 '22 02:08 sundy-li

hive sql use both single and double quote string : (

FANNG1 avatar Aug 10 '22 03:08 FANNG1

is that any plan to make double quote string as literal string as MySQL did?

We had a proposal for SQL dialect #5372, but haven't put it on schedule.

The double-quoted identifier follows standard SQL specification, and many of the analytical databases are in this style, e.g. Snowflake, AWS Redshift, Azure Synapse and etc.

leiysky avatar Aug 10 '22 04:08 leiysky

Closed by #7175

leiysky avatar Aug 24 '22 13:08 leiysky