Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create/insert with case-sensitive table name success, but not found while select. #220

Closed
Rachelint opened this issue Aug 26, 2022 · 5 comments · Fixed by #411
Closed

Create/insert with case-sensitive table name success, but not found while select. #220

Rachelint opened this issue Aug 26, 2022 · 5 comments · Fixed by #411
Labels
A-SQL Area: SQL layer A-test Area: Unit or integration test cases, or test framework docs Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Rachelint
Copy link
Contributor

Rachelint commented Aug 26, 2022

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

@Rachelint Rachelint added bug Something isn't working A-SQL Area: SQL layer labels Aug 26, 2022
@Rachelint Rachelint changed the title Create/insert case-sensitive table name success, but not found while select. Create/insert with case-sensitive table name success, but not found while select. Aug 26, 2022
@ShiKaiWi
Copy link
Member

😵‍💫

@Rachelint
Copy link
Contributor Author

😵‍💫

I think we can only support case-insensitive now?

@ShiKaiWi
Copy link
Member

ShiKaiWi commented Sep 8, 2022

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.

@ShiKaiWi
Copy link
Member

ShiKaiWi commented Oct 9, 2022

This 'bug' is introduced by apache/datafusion#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;

@jiacai2050
Copy link
Contributor

Yeah, it's a feature, not bug. I think we should:

@jiacai2050 jiacai2050 added docs Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed A-test Area: Unit or integration test cases, or test framework and removed bug Something isn't working labels Oct 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-SQL Area: SQL layer A-test Area: Unit or integration test cases, or test framework docs Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants