[bugfix](light weight schema change) support delete condition in schema change#11869
[bugfix](light weight schema change) support delete condition in schema change#11869yiguolei merged 6 commits intoapache:masterfrom
Conversation
| reader_params.delete_predicates.begin())); | ||
| } | ||
|
|
||
| TabletSchemaSPtr merge_tablet_schema = std::make_shared<TabletSchema>(); |
There was a problem hiding this comment.
Don't repeat yourself. same as the line 50, maybe we need a function
| std::vector<bool> _is_upper_keys_included; | ||
| // contains condition on key columns in agg or unique table or all column in dup tables | ||
| Conditions _conditions; | ||
| std::unique_ptr<Conditions> _conditions; |
There was a problem hiding this comment.
why change unique_ptr, need more malloc operator
There was a problem hiding this comment.
because I change tablet schema as a parameter in Conditions constructor and remove set tablet schema method because the condtion should always have a tablet schema and should not be changed. But tablet schema is not required in reader's constructor.
| @@ -233,8 +233,6 @@ class RowsetMeta { | |||
|
|
|||
| bool delete_flag() const { return _rowset_meta_pb.delete_flag(); } | |||
There was a problem hiding this comment.
this code useless also ?
There was a problem hiding this comment.
I think, it is useless. Because it is never be set, but collector depend on it and many logic depend on it, I do not know the meaning of the flag.
10c3a94 to
f250b95
Compare
|
LGTM |
3990977 to
bb49fba
Compare
df5af07 to
75e3b80
Compare
|
LGTM |
| return (*it)->tablet_schema(); | ||
| } | ||
| ++it; | ||
| } |
There was a problem hiding this comment.
_rs_version_map in Tablet is much more efficient.
| Status Conditions::append_condition(const TCondition& tcond) { | ||
| DCHECK(_schema != nullptr); | ||
| int32_t index = _schema->field_index(tcond.column_name); | ||
| int32_t index = _schema->field_index(tcond.column_unique_id); |
There was a problem hiding this comment.
Should we hide index in the TabletSchema? We can use a function like this _schema->get_clolumn_by_unique_id(tcond.column_unique_id).
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
…ma change (apache#11869) * [bugfix](light weight schema change) support delete condition in schema change Co-authored-by: yiguolei <yiguolei@gmail.com>
Proposed changes
This is part of #10136
This PR also decouple delete hander from reader.
Problem summary
Describe your changes.
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...