mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-05 21:02:58 +00:00
* feat: canonicalize all unquoted identifier to lowercase Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * add more tests Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * test altering table Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * primary key declare Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * fix primary key declare Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * partition by and time index Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * remove redundent call to canonicalize Signed-off-by: Ruihang Xia <waynestxia@gmail.com> --------- Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
46 lines
978 B
SQL
46 lines
978 B
SQL
create database upper_case_table_name;
|
|
|
|
use upper_case_table_name;
|
|
|
|
create table "system_Metric"(ts timestamp time index);
|
|
|
|
insert into "system_Metric" values (0), (1);
|
|
|
|
select * from system_Metric;
|
|
|
|
select * from "system_Metric";
|
|
|
|
drop table "system_Metric";
|
|
|
|
create table "AbCdEfG"("CoLA" string, "cOlB" string, "tS" timestamp time index, primary key ("CoLA"));
|
|
|
|
desc table "AbCdEfG";
|
|
|
|
-- unquoted table name and column name.
|
|
create table AbCdEfGe(CoLA string, cOlB string, tS timestamp time index, primary key (cOlA));
|
|
|
|
desc table aBcDeFgE;
|
|
|
|
drop table "AbCdEfG";
|
|
|
|
drop table aBcDeFgE;
|
|
|
|
-- unquoted column name in partition
|
|
create table AbCdEfGe(
|
|
CoLA string PRIMARY KEY,
|
|
tS timestamp time index
|
|
) PARTITION BY RANGE COLUMNS (cOlA) (
|
|
PARTITION p0 VALUES LESS THAN (MAXVALUE)
|
|
);
|
|
|
|
drop table abcdefge;
|
|
|
|
-- unquoted column name in TIME INDEX
|
|
create table AbCdEfGe(CoLA string, tS timestamp, TIME INDEX (Ts));
|
|
|
|
desc table abcdefge;
|
|
|
|
drop table abcdefge;
|
|
|
|
use public;
|