horaedb
horaedb copied to clipboard
Create/insert with case-sensitive table name success, but not found while select.
Describe this problem
Create/insert a table named like "DeMo" will success. But when I select something in this table, error of "table not found" will be returned.
Steps to reproduce
- Create table:
CREATE TABLE DeMo (
`timestamp` timestamp NOT NULL,
`arch` string TAG,
`datacenter` string TAG,
`value` int,
timestamp KEY (timestamp)) ENGINE=Analytic
WITH(
enable_ttl='false'
);
- Insert something:
INSERT INTO DeMo
(`timestamp`, `arch`, `datacenter`, `value`)
VALUES
(1658304762, 'x86-64', 'china', 100),
- Select something:
SELECT * FROM DeMo;
Expected behavior
No response
Additional Information
No response
:face_with_spiral_eyes:
😵💫
I think we can only support case-insensitive now?
This reference says whether the identifiers are case-sensitive depends on the OS because of the mysql implementation. And there is no a worry for CeresDB's implementation, so let's make all the identifiers case-sensitive.
This 'bug' is introduced by https://github.com/apache/arrow-datafusion/issues/1746.
Maybe this is not a bug, and just quote the ident by ` if we want to make the table names case sensitive:
SELECT * FROM
DeMo
;
Yeah, it's a feature, not bug. I think we should:
- Add a testcase
- Update document, https://docs.ceresdb.io/sql/identifier.html