Open davidshiz opened 1 year ago
assertion=0x5568a27e9a31 "distinct_size > 0" failed in group_table.cpp
// pre-allocation of distinct memory
int distinct_width = 0;
int64_t distinct_size = 0;
for (int i = no_grouping_attr; i < no_attr; i++) {
if (distinct[i]) {
desc = aggregated_desc[i - no_grouping_attr];
distinct_width = vc[i]->MaxStringSize() + 2;
distinct_size += desc.max_no_values * distinct_width;
}
}
distinct_size = int64_t(ceil(distinct_size * 1.3));
// initialize distinct tables
for (int i = no_grouping_attr; i < no_attr; i++)
if (distinct[i]) {
desc = aggregated_desc[i - no_grouping_attr];
DEBUG_ASSERT(distinct_size > 0);
gdistinct[i] = std::make_shared<GroupDistinctTable>(p_power);
gdistinct[i]->InitializeVC(vm_tab->RowNumberScope(), vc[i], desc.max_no_values,
distinct_size / no_columns_with_distinct,
(operation[i] != GT_Aggregation::GT_COUNT_NOT_NULL)); // otherwise must be decodable
gdistinct[i]->CopyFromValueMatchingTable(vm_tab.get());
distinct_size -= gdistinct[i]->BytesTaken();
no_columns_with_distinct--;
}
Have you read the Contributing Guidelines on issues?
Please confirm if bug report does NOT exists already ?
Describe the problem
only debug version crash
Expected behavior
No response
How To Reproduce
Environment
Are you interested in submitting a PR to solve the problem?