-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[feature](hive)append support for struct and map column type on textfile format of hive table #22347
Conversation
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
clang-tidy review says "All clean, LGTM! 👍" |
run buildall |
(From new machine)TeamCity pipeline, clickbench performance test result: |
} | ||
|
||
//support map<primitive_type,primitive_type> | ||
if (slot.getType().isMapType()) { |
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.
if (slot.getType().isMapType()) { | |
else if (slot.getType().isMapType()) { |
} | ||
|
||
//support Struct< primitive_type,primitive_type ... > | ||
if (slot.getType().isStructType()) { |
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.
if (slot.getType().isStructType()) { | |
else if (slot.getType().isStructType()) { |
@@ -142,7 +142,12 @@ class CsvReader : public GenericReader { | |||
|
|||
std::string _value_separator; | |||
std::string _line_delimiter; | |||
std::string _array_delimiter; | |||
// std::string _array_delimiter; |
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.
delete it
be/src/exec/text_converter.cpp
Outdated
bool TextConverter::write_vec_column(const SlotDescriptor* slot_desc, | ||
vectorized::IColumn* nullable_col_ptr, const char* data, | ||
size_t len, bool copy_string, bool need_escape, size_t rows) { | ||
bool TextConverter::write_date(const TypeDescriptor& type_desc, |
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.
bool TextConverter::write_date(const TypeDescriptor& type_desc, | |
bool TextConverter::write_data(const TypeDescriptor& type_desc, |
be/src/exec/text_converter.cpp
Outdated
vectorized::IColumn* col_ptr = nullable_col_ptr; | ||
// \N means it's NULL | ||
if (slot_desc->is_nullable()) { | ||
std::string col_type_name = col_ptr->get_name(); | ||
if (col_type_name.substr(0, 8) == "Nullable") { |
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.
Why change to this?
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.
Unable to obtain sub SlotDescriptor from SlotDescriptor . So use vectorized::IColumn * -> get_name
to determine whether the column type can be null.
18175d6
to
19af504
Compare
clang-tidy review says "All clean, LGTM! 👍" |
run buildall |
1 similar comment
run buildall |
clang-tidy review says "All clean, LGTM! 👍" |
(From new machine)TeamCity pipeline, clickbench performance test result: |
b3c18cd
to
6ce9c9d
Compare
run buildall |
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
clang-tidy review says "All clean, LGTM! 👍" |
(From new machine)TeamCity pipeline, clickbench performance test result: |
run external |
…ile format of hive table
…ile format of hive table
…ile format of hive table
…ile format of hive table
…ile format of hive table
…ile format of hive table
…ile format of hive table
2191046
to
a9138aa
Compare
clang-tidy review says "All clean, LGTM! 👍" |
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 anyone and no changes requested. |
run buildall |
(From new machine)TeamCity pipeline, clickbench performance test result: |
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. |
…ile format of hive table (#22347) 1. append support for struct and map column type on textfile format of hive table. 2. optimizer code that array column type. ```mysql +------+------------------------------------+ | id | perf | +------+------------------------------------+ | 1 | {"key1":"value1", "key2":"value2"} | | 1 | {"key1":"value1", "key2":"value2"} | | 2 | {"name":"John", "age":"30"} | +------+------------------------------------+ ``` ```mysql +---------+------------------+ | column1 | column2 | +---------+------------------+ | 1 | {10, "data1", 1} | | 2 | {20, "data2", 0} | | 3 | {30, "data3", 1} | +---------+------------------+ ``` Summarizes support for complex types(support assign delimiter) : 1. array< primitive_type > and array< array< ... > > 2. map< primitive_type , primitive_type > 3. Struct< primitive_type , primitive_type ... >
Proposed changes
Issue Number: close #xxx
after pr #21514
Summarizes support for complex types(support assign delimiter) :
Further comments
If this is a relatively large or complex change, kick off the discussion at [email protected] by explaining why you chose the solution you did and what alternatives you considered, etc...