-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[Feature](Complex-type) Add struct and map type to Doris #16444
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
Conversation
|
TeamCity pipeline, clickbench performance test result: |
|
LGTM with thrift and proto. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
cambyzju
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
xiaokang
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
add some comments that can be fixed by further PRs
| ; | ||
|
|
||
| struct_literal ::= | ||
| LBRACE expr_list:list RBRACE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
User may get confused if map literal and struct literal both use brace{}.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now, we keep struct literal using brace{}.
After we implement struct() function, we can support paren() for struct.
| public String getStringValue() { | ||
| List<String> list = new ArrayList<>(children.size()); | ||
| children.forEach(v -> list.add(v.getStringValue())); | ||
| return "{" + StringUtils.join(list, ", ") + "}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggest using '(' ')' to keep consistency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be we should support '(' ')' only in insert stmt in future.
For select stmt and other places, we keep using brace{}.
| @@ -95,7 +97,10 @@ class DataTypeFactory { | |||
| }); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
register Map to _invert_data_type_map like Array
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be we will add this part in next map pr.
83a8194 to
552c49e
Compare
…truct implement (#14545) Co-authored-by: hucheng01 <hucheng01@baidu.com>
Fix the dead loop when create column struct Co-authored-by: cambyzju <zhuxiaoli01@baidu.com>
Co-authored-by: cambyzju <zhuxiaoli01@baidu.com>
Co-authored-by: cambyzju <zhuxiaoli01@baidu.com>
1、support insert null for struct type; 2、fix explain const exprs for strut type got wrong result; Co-authored-by: cambyzju <zhuxiaoli01@baidu.com>
Add complex type map to doris on vectorized engine
552c49e to
ba9088c
Compare
cambyzju
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
PR approved by at least one committer and no changes requested. |
This commit support:
1、Insert + select for struct/map type
2、Json stream load for struct type
3、m[key] function for map type
How to use:
Set the fe config to create table for struct and map type
1、admin set frontend config("enable_struct_type" = "true");
2、admin set frontend config("enable_map_type" = "true");
apache#16547
Co-authored-by: xy720 <xuyang25@baidu.com>
Co-authored-by: amory <wangqiannan@selectdb.com>
Co-authored-by: cambyzju <zhuxiaoli01@baidu.com>
Co-authored-by: hucheng01 <hucheng01@baidu.com>
Proposed changes
Support complex type struct and map to Doris.
Design docs for struct and map
Problem summary
This commit support:
1、Insert + select for struct/map type
2、Json stream load for struct type
3、m[key] function for map type
How to use:
Set the fe config to create table for struct and map type
1、admin set frontend config("enable_struct_type" = "true");
2、admin set frontend config("enable_map_type" = "true");
#16547
Checklist(Required)
Further comments
If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...