-
Notifications
You must be signed in to change notification settings - Fork 320
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
be815c8
commit 237fa28
Showing
5 changed files
with
309 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,278 @@ | ||
# Copyright 2021 4Paradigm | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
db: test_zw | ||
debugs: [] | ||
cases: | ||
- | ||
id: 0 | ||
desc: 插入所有类型的数据 | ||
inputs: | ||
- | ||
columns : ["c1 string","c2 smallint","c3 int","c4 bigint","c5 float","c6 double","c7 timestamp","c8 date"] | ||
indexs: ["index1:c1:c7"] | ||
rows: | ||
- ["aa",1,2,3,1.1,2.1,1590738989000,"2020-05-01"] | ||
sql: select * from {0}; | ||
expect: | ||
columns : ["c1 string","c2 smallint","c3 int","c4 bigint","c5 float","c6 double","c7 timestamp","c8 date"] | ||
rows: | ||
- ["aa",1,2,3,1.1,2.1,1590738989000,"2020-05-01"] | ||
- | ||
id: 1 | ||
desc: 插入所有列的数据 | ||
sqlDialect: ["HybridSQL"] | ||
inputs: | ||
- | ||
create: | | ||
create table {0} (c1 string, c3 int, c4 bigint, c5 float, c6 double, c7 timestamp, c8 date, | ||
index(key=(c1), ts=c7)); | ||
insert: insert into {0} values(?,?,?,?,?,?,?); | ||
rows: | ||
- ["aa",2,3,1.1,2.1,1590738989000,"2020-05-01"] | ||
sql: select * from {0}; | ||
expect: | ||
columns : ["c1 string", "c3 int","c4 bigint","c5 float","c6 double","c7 timestamp","c8 date"] | ||
rows: | ||
- ["aa",2,3,1.1,2.1,1590738989000,"2020-05-01"] | ||
- | ||
id: 2 | ||
desc: 插入部分列数据 | ||
sqlDialect: ["HybridSQL"] | ||
inputs: | ||
- | ||
create: | | ||
create table {0} (c1 string, c3 int, c4 bigint, c5 float, c6 double, c7 timestamp, c8 date, | ||
index(key=(c1), ts=c7)); | ||
insert: insert into {0} (c1,c4,c7) values(?,?,?); | ||
rows: | ||
- ["aa",2,1590738989000] | ||
sql: select * from {0}; | ||
expect: | ||
columns : ["c1 string","c3 int","c4 bigint","c5 float","c6 double","c7 timestamp","c8 date"] | ||
rows: | ||
- ["aa",null,2,null,null,1590738989000,null] | ||
- | ||
id: 3 | ||
desc: 没有指定NotNull的列插入null | ||
sqlDialect: ["HybridSQL"] | ||
inputs: | ||
- | ||
create: | | ||
create table {0} (c1 string, c3 int, c4 bigint, c5 float, c6 double, c7 timestamp, c8 date, | ||
index(key=(c1), ts=c7)); | ||
insert: insert into {0} (c1,c3,c4,c5,c6,c7,c8) values(?,?,?,?,?,?,?); | ||
rows: | ||
- ["aa",2,null,null,null,1590738989000,null] | ||
sql: select * from {0}; | ||
expect: | ||
columns : ["c1 string","c3 int","c4 bigint","c5 float","c6 double","c7 timestamp","c8 date"] | ||
rows: | ||
- ["aa",2,null,null,null,1590738989000,null] | ||
- | ||
id: 4 | ||
desc: 字符串类型插入空串 | ||
sqlDialect: ["HybridSQL"] | ||
inputs: | ||
- | ||
create: | | ||
create table {0} ( c1 string NOT NULL, c2 timestamp, | ||
index(key=(c1), ts=c2)); | ||
insert: insert into {0} (c1,c2) values(?,?); | ||
rows: | ||
- ["",1590738989000] | ||
sql: select * from {0}; | ||
expect: | ||
columns : ["c1 string","c2 timestamp"] | ||
rows: | ||
- ["",1590738989000] | ||
- | ||
id: 5 | ||
desc: 相同时间戳数据 | ||
inputs: | ||
- | ||
columns : ["c1 string","c2 smallint","c3 int","c4 bigint","c5 float","c6 double","c7 timestamp","c8 date"] | ||
indexs: ["index1:c1:c7"] | ||
rows: | ||
- ["aa",1,2,3,1.1,2.1,1590738989000,"2020-05-01"] | ||
- ["aa",2,2,3,1.1,2.1,1590738989000,"2020-05-01"] | ||
- ["aa",3,2,3,1.1,2.1,1590738989000,"2020-05-01"] | ||
- ["aa",4,2,3,1.1,2.1,1590738989000,"2020-05-01"] | ||
- ["aa",5,2,3,1.1,2.1,1590738989000,"2020-05-01"] | ||
- ["aa",6,2,3,1.1,2.1,1590738989000,"2020-05-01"] | ||
- ["aa",7,2,3,1.1,2.1,1590738989000,"2020-05-01"] | ||
- ["aa",8,2,3,1.1,2.1,1590738989000,"2020-05-01"] | ||
- ["aa",9,2,3,1.1,2.1,1590738989000,"2020-05-01"] | ||
- ["aa",10,2,3,1.1,2.1,1590738989000,"2020-05-01"] | ||
- ["aa",11,2,3,1.1,2.1,1590738989000,"2020-05-01"] | ||
- ["aa",12,2,3,1.1,2.1,1590738989000,"2020-05-01"] | ||
- ["aa",13,2,3,1.1,2.1,1590738989000,"2020-05-01"] | ||
- ["aa",14,2,3,1.1,2.1,1590738989000,"2020-05-01"] | ||
- ["aa",15,2,3,1.1,2.1,1590738989000,"2020-05-01"] | ||
- ["aa",16,2,3,1.1,2.1,1590738989000,"2020-05-01"] | ||
- ["aa",17,2,3,1.1,2.1,1590738989000,"2020-05-01"] | ||
- ["aa",18,2,3,1.1,2.1,1590738989000,"2020-05-01"] | ||
- ["aa",19,2,3,1.1,2.1,1590738989000,"2020-05-01"] | ||
- ["aa",20,2,3,1.1,2.1,1590738989000,"2020-05-01"] | ||
sql: select * from {0}; | ||
expect: | ||
columns : ["c1 string","c2 smallint","c3 int","c4 bigint","c5 float","c6 double","c7 timestamp","c8 date"] | ||
order: c2 | ||
rows: | ||
- [ "aa",1,2,3,1.1,2.1,1590738989000,"2020-05-01" ] | ||
- [ "aa",2,2,3,1.1,2.1,1590738989000,"2020-05-01" ] | ||
- [ "aa",3,2,3,1.1,2.1,1590738989000,"2020-05-01" ] | ||
- [ "aa",4,2,3,1.1,2.1,1590738989000,"2020-05-01" ] | ||
- [ "aa",5,2,3,1.1,2.1,1590738989000,"2020-05-01" ] | ||
- [ "aa",6,2,3,1.1,2.1,1590738989000,"2020-05-01" ] | ||
- [ "aa",7,2,3,1.1,2.1,1590738989000,"2020-05-01" ] | ||
- [ "aa",8,2,3,1.1,2.1,1590738989000,"2020-05-01" ] | ||
- [ "aa",9,2,3,1.1,2.1,1590738989000,"2020-05-01" ] | ||
- [ "aa",10,2,3,1.1,2.1,1590738989000,"2020-05-01" ] | ||
- [ "aa",11,2,3,1.1,2.1,1590738989000,"2020-05-01" ] | ||
- [ "aa",12,2,3,1.1,2.1,1590738989000,"2020-05-01" ] | ||
- [ "aa",13,2,3,1.1,2.1,1590738989000,"2020-05-01" ] | ||
- [ "aa",14,2,3,1.1,2.1,1590738989000,"2020-05-01" ] | ||
- [ "aa",15,2,3,1.1,2.1,1590738989000,"2020-05-01" ] | ||
- [ "aa",16,2,3,1.1,2.1,1590738989000,"2020-05-01" ] | ||
- [ "aa",17,2,3,1.1,2.1,1590738989000,"2020-05-01" ] | ||
- [ "aa",18,2,3,1.1,2.1,1590738989000,"2020-05-01" ] | ||
- [ "aa",19,2,3,1.1,2.1,1590738989000,"2020-05-01" ] | ||
- [ "aa",20,2,3,1.1,2.1,1590738989000,"2020-05-01" ] | ||
- | ||
id: 6 | ||
desc: 时间年初 | ||
inputs: | ||
- | ||
columns : ["c1 string","c2 smallint","c3 int","c7 timestamp","c8 date"] | ||
indexs: ["index1:c1:c7"] | ||
rows: | ||
- ["aa",1,2,1590738989000,"2020-01-01"] | ||
sql: select * from {0}; | ||
expect: | ||
columns : ["c1 string","c2 smallint","c3 int","c7 timestamp","c8 date"] | ||
rows: | ||
- ["aa",1,2,1590738989000,"2020-01-01"] | ||
- | ||
id: 7 | ||
desc: 时间年末 | ||
inputs: | ||
- | ||
columns : ["c1 string","c2 smallint","c3 int","c7 timestamp","c8 date"] | ||
indexs: ["index1:c1:c7"] | ||
rows: | ||
- ["aa",1,2,1590738989000,"2020-12-31"] | ||
sql: select * from {0}; | ||
expect: | ||
columns : ["c1 string","c2 smallint","c3 int","c7 timestamp","c8 date"] | ||
rows: | ||
- ["aa",1,2,1590738989000,"2020-12-31"] | ||
- | ||
id: 8 | ||
desc: 时间月初 | ||
inputs: | ||
- | ||
columns : ["c1 string","c2 smallint","c3 int","c7 timestamp","c8 date"] | ||
indexs: ["index1:c1:c7"] | ||
rows: | ||
- ["aa",1,2,1590738989000,"2020-12-01"] | ||
sql: select * from {0}; | ||
expect: | ||
columns : ["c1 string","c2 smallint","c3 int","c7 timestamp","c8 date"] | ||
rows: | ||
- ["aa",1,2,1590738989000,"2020-12-01"] | ||
- | ||
id: 9 | ||
desc: 时间月末 | ||
inputs: | ||
- | ||
columns : ["c1 string","c2 smallint","c3 int","c7 timestamp","c8 date"] | ||
indexs: ["index1:c1:c7"] | ||
rows: | ||
- ["aa",1,2,1590738989000,"2020-11-30"] | ||
sql: select * from {0}; | ||
expect: | ||
columns : ["c1 string","c2 smallint","c3 int","c7 timestamp","c8 date"] | ||
rows: | ||
- ["aa",1,2,1590738989000,"2020-11-30"] | ||
- | ||
id: 10 | ||
desc: 时间2月末 | ||
inputs: | ||
- | ||
columns : ["c1 string","c2 smallint","c3 int","c7 timestamp","c8 date"] | ||
indexs: ["index1:c1:c7"] | ||
rows: | ||
- ["aa",1,2,1590738989000,"2020-02-28"] | ||
sql: select * from {0}; | ||
expect: | ||
columns : ["c1 string","c2 smallint","c3 int","c7 timestamp","c8 date"] | ||
rows: | ||
- ["aa",1,2,1590738989000,"2020-02-28"] | ||
- | ||
id: 11 | ||
desc: 时间3月初 | ||
inputs: | ||
- | ||
columns : ["c1 string","c2 smallint","c3 int","c7 timestamp","c8 date"] | ||
indexs: ["index1:c1:c7"] | ||
rows: | ||
- ["aa",1,2,1590738989000,"2020-03-01"] | ||
sql: select * from {0}; | ||
expect: | ||
columns : ["c1 string","c2 smallint","c3 int","c7 timestamp","c8 date"] | ||
rows: | ||
- ["aa",1,2,1590738989000,"2020-03-01"] | ||
- | ||
id: 12 | ||
desc: 时间1970-01-01 | ||
inputs: | ||
- | ||
columns : ["c1 string","c2 smallint","c3 int","c7 timestamp","c8 date"] | ||
indexs: ["index1:c1:c7"] | ||
rows: | ||
- ["aa",1,2,1590738989000,"1970-01-01"] | ||
sql: select * from {0}; | ||
expect: | ||
columns : ["c1 string","c2 smallint","c3 int","c7 timestamp","c8 date"] | ||
rows: | ||
- ["aa",1,2,1590738989000,"1970-01-01"] | ||
- | ||
id: 13 | ||
desc: 时间1969-12-31 | ||
inputs: | ||
- | ||
columns : ["c1 string","c2 smallint","c3 int","c7 timestamp","c8 date"] | ||
indexs: ["index1:c1:c7"] | ||
rows: | ||
- ["aa",1,2,1590738989000,"1969-12-31"] | ||
sql: select * from {0}; | ||
expect: | ||
columns : ["c1 string","c2 smallint","c3 int","c7 timestamp","c8 date"] | ||
rows: | ||
- ["aa",1,2,1590738989000,"1969-12-31"] | ||
- | ||
id: 14 | ||
desc: 时间-0330 | ||
inputs: | ||
- | ||
columns : ["c1 string","c2 smallint","c3 int","c7 timestamp","c8 date"] | ||
indexs: ["index1:c1:c7"] | ||
rows: | ||
- ["aa",1,2,1590738989000,"2020-03-30"] | ||
sql: select * from {0}; | ||
expect: | ||
columns : ["c1 string","c2 smallint","c3 int","c7 timestamp","c8 date"] | ||
rows: | ||
- ["aa",1,2,1590738989000,"2020-03-30"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters