-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[Feature](Variant) support variant sparse feature and schema template with multi indexes #51623
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
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
b0f6c1e to
ac71c3d
Compare
|
run buildall |
84ceebf to
808f525
Compare
|
run buildall |
Cloud UT Coverage ReportIncrement line coverage Increment coverage report
|
|
run buildall |
Cloud UT Coverage ReportIncrement line coverage Increment coverage report
|
|
run buildall |
Cloud UT Coverage ReportIncrement line coverage Increment coverage report
|
|
run buildall |
Cloud UT Coverage ReportIncrement line coverage Increment coverage report
|
852cdbc to
c46cc63
Compare
953d0c0 to
2a7fc31
Compare
|
run buildall |
Cloud UT Coverage ReportIncrement line coverage Increment coverage report
|
zzzxl1993
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 anyone and no changes requested. |
| */ | ||
|
|
||
| const int BeExecVersionManager::max_be_exec_version = 8; | ||
| const int BeExecVersionManager::max_be_exec_version = 9; |
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.
没必要有这个,直接做不兼容的改动就好了,如果有这个,我们说明有一些遗留的代码,是可以删除的
| add_mapping<FieldType::OLAP_FIELD_TYPE_DECIMAL256>(); | ||
| add_mapping<FieldType::OLAP_FIELD_TYPE_IPV4>(); | ||
| add_mapping<FieldType::OLAP_FIELD_TYPE_IPV6>(); | ||
| add_mapping<FieldType::OLAP_FIELD_TYPE_FLOAT>(); |
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 (!st.ok()) { | ||
| return st; | ||
| } | ||
| auto index_metes = _rowset_meta->tablet_schema()->inverted_indexs(*column); |
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.
typo error?
| auto status = process_files(*index_meta, indices, index); | ||
| if (!status.ok()) { | ||
| return status; | ||
| auto status = process_files(*index_meta, indices, index); |
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.
return if error
| _rowset_meta->set_tablet_uid(_context.tablet_uid); | ||
| _rowset_meta->set_tablet_schema(_context.tablet_schema); | ||
| auto schema = _context.tablet_schema->need_record_variant_extended_schema() | ||
| ? _context.tablet_schema |
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 SegmentFlusher::need_buffering() { | ||
| // buffering variants for schema change | ||
| return _context.write_type == DataWriteType::TYPE_SCHEMA_CHANGE && |
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.
variant 支持啥schema change啊?
| //bool has_null = true; | ||
| //RETURN_IF_ERROR(index_file_reader->has_null(index_meta, &has_null)); | ||
| //_inverted_index->set_has_null(has_null); | ||
| _index_readers[index_meta->index_id()] = index_reader; |
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.
我们当前是每一个column reader 里缓存这个column 相关的所有的index readers 吗?
| opts, column, std::unique_ptr<Field>(FieldFactory::create(*column)))); | ||
| return Status::OK(); | ||
| } | ||
| *writer = std::unique_ptr<ColumnWriter>(new VariantColumnWriter( |
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.
std::make_unique
| // Use ScalarColumnWriter to write it's only root data | ||
| std::unique_ptr<ColumnWriter> writer_local = std::unique_ptr<ColumnWriter>( | ||
| new ScalarColumnWriter(opts, std::move(field), file_writer)); | ||
| *writer = std::move(writer_local); |
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.
std::make_unique
| // Use ScalarColumnWriter to write it's only root data | ||
| std::unique_ptr<ColumnWriter> writer_local = std::unique_ptr<ColumnWriter>( | ||
| new ScalarColumnWriter(opts, std::move(field), file_writer)); | ||
| *writer = std::move(writer_local); |
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.
std::make_unique
| const std::vector<TabletColumnPtr>& sparse_columns() const; | ||
| size_t num_sparse_columns() const { return _num_sparse_columns; } | ||
|
|
||
| void set_precision_frac(int32_t precision, int32_t frac) { |
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.
为什么会有set 方法?这个不应该是从元数据中读取出来是啥就是啥吗?
| const std::vector<TabletColumnPtr>& sparse_columns() const; | ||
| size_t num_sparse_columns() const { return _num_sparse_columns; } | ||
|
|
||
| void set_precision_frac(int32_t precision, int32_t frac) { |
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.
为什么会有set 方法?这个不应该是从元数据中读取出来是啥就是啥吗?
| vectorized::PathInData path; | ||
| vectorized::ColumnPtr column; | ||
| vectorized::DataTypePtr type; | ||
| }; |
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.
所有的新文件,默认都要加上编译检查
| return Status::OK(); | ||
| } | ||
|
|
||
| void set_variant_max_subcolumns_count(int32_t variant_max_subcolumns_count) { |
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.
为什么要提供set 方法
| */ | ||
| #define writeCString(s, buf) (buf).write((s), strlen(s)) | ||
|
|
||
| inline void writeJSONString(const char* begin, const char* end, BufferWritable& buf) { |
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.
这个方法应该是bufferwriteable的成员函数
| } | ||
|
|
||
| /** Writes a C-string without creating a temporary object. If the string is a literal, then `strlen` is executed at the compilation stage. | ||
| * Use when the string is a literal. |
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.
这个代码需要单独看看!!
| return col_res; | ||
| } else { | ||
| static_assert(false); | ||
| // static_assert(false); |
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.
为啥注释了?
| @@ -66,6 +66,7 @@ message PColumnMeta { | |||
| optional string function_name = 7; | |||
| optional int32 be_exec_version = 8; | |||
| optional segment_v2.ColumnPathInfo column_path = 9; | |||
| optional int32 variant_max_subcolumns_count = 10 [default = 0]; | |||
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.
default 0 是啥含义?
| // this field is only used during flexible partial update load | ||
| optional bool is_on_update_current_timestamp = 25 [default = false]; | ||
| optional bool is_on_update_current_timestamp = 28 [default = false]; |
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.
你这改一下顺序,是不是启动的时候存储就错了啊?
e53d779 to
c268637
Compare
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)