Closed NiwakaDev closed 1 month ago
By the way, we can read a lowercase table like so:
select * from node_time_seconds;
Am I missing something? If not, I'd like to work on this issue.
The MySQL client or Postgres?
You need to quote the identifier if it encounters special characters or uppercase letters.
for pg:
select * from "node_netstat_Tcp_InSegs";
for MySQL:
select * from `node_netstat_Tcp_InSegs`
https://docs.greptime.com/reference/sql/compatibility#ansi-compatibility
Closed as answered. Actually I hit the same problem just yesterday, it's not quite obvious that SQL identifier literal is "case-insensitive".
@killme2008 @tisonkun Thanks!
What type of bug is this?
Incorrect result
What subsystems are affected?
Standalone mode (Maybe both mode)
Minimal reproduce step
What did you expect to see?
When reading all tables sent from the prometheus, every query should work, like this:
What did you see instead?
error:
ERROR 1146 (42S02): (TableNotFound): Failed to plan SQL: Table not found: greptime.public.node_netstat_tcp_insegs
It seems like tables sent from Prometheus aren't created as lowercase, while we can read those created from others, like MySQL client.
This is because those from others are created in lowercase, I guess.
What operating system did you use?
Maybe Any OS
What version of GreptimeDB did you use?
latest commit(e39f49fe567be8e7cb41c8541bcdfbf206af5c8f)
Relevant log output and stack trace
No response