Skip to content

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
4paradigm committed Jan 31, 2024
2 parents 94e3019 + ff3ef0d commit 2df57b2
Show file tree
Hide file tree
Showing 236 changed files with 2,782 additions and 1,152 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ jobs:
pr-name-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '14'
node-version: '18'
- name: Install Dependencies
run: npm install @commitlint/config-conventional
- uses: JulienKode/[email protected]
run: npm install @commitlint/[email protected]

- uses: JulienKode/[email protected]
2 changes: 1 addition & 1 deletion cases/function/join/test_lastjoin_simple.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1067,4 +1067,4 @@ cases:
rows:
- [ "aa",2,131,1590738990000 ]
- [ "bb",21,NULL,NULL ]
- [ "dd", 41, NULL, NULL ]
- [ "dd", 41, NULL, NULL ]
2 changes: 0 additions & 2 deletions cases/plan/back_quote_identifier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,10 @@ cases:
| | +-node[kColumnDesc]
| | +-column_name: a-1
| | +-column_type: int32
| | +-NOT NULL: 0
| +-1:
| | +-node[kColumnDesc]
| | +-column_name: b-1
| | +-column_type: string
| | +-NOT NULL: 0
| +-2:
| +-node[kColumnIndex]
| +-keys: [a-1, b-1]
Expand Down
33 changes: 33 additions & 0 deletions cases/plan/const_query.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,36 @@ cases:
mode: request-unsupport
sql: |
select int(NULL) as c1, bigint(NULL) as c2, float(NULL) as c3, double(NULL) as c4, timestamp(NULL) as c5, date(NULL) as c6, string(NULL) as c7;
- id: map_data_type
mode: request-unsupport
desc: access map value with []operator
sql: |
select map(1, 2)[1]
expect:
node_tree_str: |
+-node[kQuery]: kQuerySelect
+-distinct_opt: false
+-where_expr: null
+-group_expr_list: null
+-having_expr: null
+-order_expr_list: null
+-limit: null
+-select_list[list]:
| +-0:
| +-node[kResTarget]
| +-val:
| | map(1, 2)[1]
| +-name: <nil>
+-tableref_list: []
+-window_list: []
plan_tree_str: |
+-[kQueryPlan]
+-[kProjectPlan]
+-table: <nil>
+-project_list_vec[list]:
+-[kProjectList]
+-projects on table [list]:
+-[kProjectNode]
+-[0]map(1, 2)[1]: map(1, 2)[1]
null
120 changes: 60 additions & 60 deletions cases/plan/create.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,10 @@ cases:
| | +-node[kColumnDesc]
| | +-column_name: a
| | +-column_type: int32
| | +-NOT NULL: 0
| +-1:
| | +-node[kColumnDesc]
| | +-column_name: b
| | +-column_type: string
| | +-NOT NULL: 0
| +-2:
| +-node[kColumnIndex]
| +-keys: [a, b]
Expand Down Expand Up @@ -218,12 +216,10 @@ cases:
| | +-node[kColumnDesc]
| | +-column_name: a
| | +-column_type: int16
| | +-NOT NULL: 0
| +-1:
| | +-node[kColumnDesc]
| | +-column_name: b
| | +-column_type: float
| | +-NOT NULL: 0
| +-2:
| +-node[kColumnIndex]
| +-keys: [a]
Expand Down Expand Up @@ -274,12 +270,10 @@ cases:
| | +-node[kColumnDesc]
| | +-column_name: a
| | +-column_type: int32
| | +-NOT NULL: 0
| +-1:
| | +-node[kColumnDesc]
| | +-column_name: b
| | +-column_type: timestamp
| | +-NOT NULL: 0
| +-2:
| +-node[kColumnIndex]
| +-keys: [a]
Expand Down Expand Up @@ -627,12 +621,10 @@ cases:
| | +-node[kColumnDesc]
| | +-column_name: a
| | +-column_type: int32
| | +-NOT NULL: 0
| +-1:
| | +-node[kColumnDesc]
| | +-column_name: b
| | +-column_type: timestamp
| | +-NOT NULL: 0
| +-2:
| +-node[kColumnIndex]
| +-keys: [a]
Expand Down Expand Up @@ -685,33 +677,27 @@ cases:
| +-0:
| | +-node[kColumnDesc]
| | +-column_name: column1
| | +-column_type: int32
| | +-NOT NULL: 1
| | +-column_type: int32 NOT NULL
| +-1:
| | +-node[kColumnDesc]
| | +-column_name: column2
| | +-column_type: int16
| | +-NOT NULL: 1
| | +-column_type: int16 NOT NULL
| +-2:
| | +-node[kColumnDesc]
| | +-column_name: column5
| | +-column_type: string
| | +-NOT NULL: 1
| | +-column_type: string NOT NULL
| +-3:
| | +-node[kColumnDesc]
| | +-column_name: column6
| | +-column_type: string
| | +-NOT NULL: 1
| | +-column_type: string NOT NULL
| +-4:
| | +-node[kColumnDesc]
| | +-column_name: std_ts
| | +-column_type: timestamp
| | +-NOT NULL: 1
| | +-column_type: timestamp NOT NULL
| +-5:
| | +-node[kColumnDesc]
| | +-column_name: std_date
| | +-column_type: date
| | +-NOT NULL: 1
| | +-column_type: date NOT NULL
| +-6:
| +-node[kColumnIndex]
| +-keys: [column2]
Expand Down Expand Up @@ -743,33 +729,27 @@ cases:
| +-0:
| | +-node[kColumnDesc]
| | +-column_name: column1
| | +-column_type: int32
| | +-NOT NULL: 1
| | +-column_type: int32 NOT NULL
| +-1:
| | +-node[kColumnDesc]
| | +-column_name: column2
| | +-column_type: int16
| | +-NOT NULL: 1
| | +-column_type: int16 NOT NULL
| +-2:
| | +-node[kColumnDesc]
| | +-column_name: column5
| | +-column_type: string
| | +-NOT NULL: 1
| | +-column_type: string NOT NULL
| +-3:
| | +-node[kColumnDesc]
| | +-column_name: column6
| | +-column_type: string
| | +-NOT NULL: 1
| | +-column_type: string NOT NULL
| +-4:
| | +-node[kColumnDesc]
| | +-column_name: std_ts
| | +-column_type: timestamp
| | +-NOT NULL: 1
| | +-column_type: timestamp NOT NULL
| +-5:
| | +-node[kColumnDesc]
| | +-column_name: std_date
| | +-column_type: date
| | +-NOT NULL: 1
| | +-column_type: date NOT NULL
| +-6:
| +-node[kColumnIndex]
| +-keys: [column2]
Expand All @@ -796,17 +776,11 @@ cases:
| +-0:
| | +-node[kColumnDesc]
| | +-column_name: column1
| | +-column_type: int32
| | +-NOT NULL: 0
| | +-default_value:
| | +-expr[primary]
| | +-value: 1
| | +-type: int32
| | +-column_type: int32 DEFAULT 1
| +-1:
| +-node[kColumnDesc]
| +-column_name: column2
| +-column_type: int32
| +-NOT NULL: 0
+-table_option_list: []
- id: 27
desc: Column default value with explicit type
Expand All @@ -824,20 +798,11 @@ cases:
| +-0:
| | +-node[kColumnDesc]
| | +-column_name: column1
| | +-column_type: string
| | +-NOT NULL: 0
| | +-default_value:
| | +-expr[cast]
| | +-cast_type: string
| | +-expr:
| | +-expr[primary]
| | +-value: 1
| | +-type: int32
| | +-column_type: string DEFAULT string(1)
| +-1:
| +-node[kColumnDesc]
| +-column_name: column3
| +-column_type: int32
| +-NOT NULL: 0
+-table_option_list: []
- id: 28
desc: Create table with database.table
Expand All @@ -856,12 +821,10 @@ cases:
| | +-node[kColumnDesc]
| | +-column_name: column1
| | +-column_type: string
| | +-NOT NULL: 0
| +-1:
| +-node[kColumnDesc]
| +-column_name: column3
| +-column_type: int32
| +-NOT NULL: 0
+-table_option_list: []
- id: 29
desc: create index with db name prefix
Expand Down Expand Up @@ -898,12 +861,10 @@ cases:
| | +-node[kColumnDesc]
| | +-column_name: column1
| | +-column_type: int32
| | +-NOT NULL: 0
| +-1:
| | +-node[kColumnDesc]
| | +-column_name: column2
| | +-column_type: timestamp
| | +-NOT NULL: 0
| +-2:
| +-node[kColumnIndex]
| +-keys: [column1]
Expand Down Expand Up @@ -934,12 +895,10 @@ cases:
| | +-node[kColumnDesc]
| | +-column_name: a
| | +-column_type: int32
| | +-NOT NULL: 0
| +-1:
| | +-node[kColumnDesc]
| | +-column_name: b
| | +-column_type: timestamp
| | +-NOT NULL: 0
| +-2:
| +-node[kColumnIndex]
| +-keys: [a]
Expand Down Expand Up @@ -1049,12 +1008,10 @@ cases:
| | +-node[kColumnDesc]
| | +-column_name: column1
| | +-column_type: int32
| | +-NOT NULL: 0
| +-1:
| | +-node[kColumnDesc]
| | +-column_name: column2
| | +-column_type: timestamp
| | +-NOT NULL: 0
| +-2:
| +-node[kColumnIndex]
| +-keys: [column1]
Expand All @@ -1069,7 +1026,50 @@ cases:
+-node[kCompressType]
+-compress_type: snappy
- id: create_user
- id: 35
desc: Create table with array & map type
sql: |
create table t1 (id int,
member ARRAY <STRING> NOT NULL,
attrs MAP <STRING, INT NOT NULL > NOT NULL);
expect:
node_tree_str: |
+-node[CREATE]
+-table: t1
+-IF NOT EXIST: 0
+-column_desc_list[list]:
| +-0:
| | +-node[kColumnDesc]
| | +-column_name: id
| | +-column_type: int32
| +-1:
| | +-node[kColumnDesc]
| | +-column_name: member
| | +-column_type: array<string> NOT NULL
| +-2:
| +-node[kColumnDesc]
| +-column_name: attrs
| +-column_type: map<string, int32 NOT NULL> NOT NULL
+-table_option_list: []
plan_tree_str: |
+-[kCreatePlan]
+-table: t1
+-column_desc_list[list]:
| +-0:
| | +-node[kColumnDesc]
| | +-column_name: id
| | +-column_type: int32
| +-1:
| | +-node[kColumnDesc]
| | +-column_name: member
| | +-column_type: array<string> NOT NULL
| +-2:
| +-node[kColumnDesc]
| +-column_name: attrs
| +-column_type: map<string, int32 NOT NULL> NOT NULL
+-table_option_list: []
- id: 36
desc: create user
sql: |
create user root;
Expand All @@ -1080,8 +1080,8 @@ cases:
+-user: root
+-options: <nil>
- id: create_user_if_not_exist
desc: create user
- id: 37
desc: create user if not exist
sql: |
create user if not exists root;
expect:
Expand Down
1 change: 1 addition & 0 deletions cases/plan/simple_query.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -644,3 +644,4 @@ cases:
+-[kTablePlan]
+-table: t
+-alias: t1
Loading

0 comments on commit 2df57b2

Please sign in to comment.