Skip to content
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

[Bug]fix the crash of checksum task #3735 #3738

Merged
merged 4 commits into from
Jun 10, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions be/src/olap/row.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ bool equal_row(const std::vector<uint32_t>& ids,
template<typename LhsRowType, typename RhsRowType>
int compare_row(const LhsRowType& lhs, const RhsRowType& rhs) {
for (uint32_t cid = 0; cid < lhs.schema()->num_key_columns(); ++cid) {
//because the num_column_ids include the column of double/float type
if (lhs.schema()->column(cid) == NULL) {
continue;
}
auto res = lhs.schema()->column(cid)->compare_cell(lhs.cell(cid), rhs.cell(cid));
if (res != 0) {
return res;
Expand All @@ -76,6 +80,10 @@ template<typename LhsRowType, typename RhsRowType>
int compare_row_key(const LhsRowType& lhs, const RhsRowType& rhs) {
auto cmp_cids = std::min(lhs.schema()->num_column_ids(), rhs.schema()->num_column_ids());
for (uint32_t cid = 0; cid < cmp_cids; ++cid) {
//because the num_column_ids include the column of double/float type
if (lhs.schema()->column(cid) == NULL) {
continue;
}
auto res = lhs.schema()->column(cid)->compare_cell(lhs.cell(cid), rhs.cell(cid));
if (res != 0) {
return res;
Expand Down