mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
fix debug assert in table asynchronous_inserts
This commit is contained in:
parent
275118b0e8
commit
66173d2cc0
@ -52,12 +52,14 @@ void StorageSystemAsynchronousInserts::fillData(MutableColumns & res_columns, Co
|
||||
auto time_in_microseconds = [](const time_point<steady_clock> & timestamp)
|
||||
{
|
||||
auto time_diff = duration_cast<microseconds>(steady_clock::now() - timestamp);
|
||||
return (system_clock::now() - time_diff).time_since_epoch().count();
|
||||
auto time_us = (system_clock::now() - time_diff).time_since_epoch().count();
|
||||
|
||||
DecimalUtils::DecimalComponents<DateTime64> components{time_us / 1'000'000, time_us % 1'000'000};
|
||||
return DecimalField(DecimalUtils::decimalFromComponents<DateTime64>(components, TIME_SCALE), TIME_SCALE);
|
||||
};
|
||||
|
||||
size_t i = 0;
|
||||
|
||||
const auto & insert_query = key.query->as<const ASTInsertQuery &>();
|
||||
size_t i = 0;
|
||||
|
||||
res_columns[i++]->insert(queryToString(insert_query));
|
||||
res_columns[i++]->insert(insert_query.table_id.getDatabaseName());
|
||||
@ -78,8 +80,7 @@ void StorageSystemAsynchronousInserts::fillData(MutableColumns & res_columns, Co
|
||||
arr_bytes.push_back(entry->bytes.size());
|
||||
arr_finished.push_back(entry->isFinished());
|
||||
|
||||
auto exception = entry->getException();
|
||||
if (exception)
|
||||
if (auto exception = entry->getException())
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -1,6 +1,3 @@
|
||||
async_inserts CSV 23 2
|
||||
async_inserts CSVWithNames 44 2
|
||||
async_inserts JSONEachRow 78 2
|
||||
1 a
|
||||
2 b
|
||||
3 c
|
||||
|
Loading…
Reference in New Issue
Block a user