Skip to content

Conversation

@luozenglin
Copy link
Contributor

@luozenglin luozenglin commented Feb 15, 2023

Proposed changes

Issue Number: close #16658

Problem summary

Status SegmentWriter::_create_writers_with_block(
        const vectorized::Block* block,
        std::function<Status(uint32_t, const TabletColumn&)> create_column_writer) {
    ...
    for (size_t i = 0; i < block->columns(); ++i) {
        const auto& column_type_name = block->get_by_position(i);
        auto idx = _tablet_schema->field_index(column_type_name.name);
        if (idx >= 0) {
            RETURN_IF_ERROR(create_column_writer(i, _tablet_schema->column(idx)));
        } 
    ...
    }
    return Status::OK();
}

In qt_sql1 of test_insert.groovy, the schema of block in the above code is k6, k3, k1, sum(k1), while _tablet_schema is k1, k2, k3, k4. k3 in block and k3 in _tablet_schema have the same column name but not the corresponding column, which causes an error.

Checklist(Required)

  • Does it affect the original behavior
  • Has unit tests been added
  • Has document been added or modified
  • Does it need to update dependencies
  • Is this PR support rollback (If NO, please explain WHY)

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...

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@hello-stephen
Copy link
Contributor

TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 36.14 seconds
stream load tsv: 486 seconds loaded 74807831229 Bytes, about 146 MB/s
stream load json: 38 seconds loaded 2358488459 Bytes, about 59 MB/s
stream load orc: 68 seconds loaded 1101869774 Bytes, about 15 MB/s
stream load parquet: 28 seconds loaded 861443392 Bytes, about 29 MB/s
https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20230216035451_clickbench_pr_97424.html

@luozenglin luozenglin closed this Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] [daily] BE core when execute insert streaming with win function

2 participants