small fixes for CHECK TABLE

This commit is contained in:
vdimir 2023-08-04 09:22:00 +00:00
parent aeee50466c
commit 358ef26385
No known key found for this signature in database
GPG Key ID: 6EE4CE2BEDC51862
5 changed files with 9 additions and 9 deletions

View File

@ -129,7 +129,7 @@ public:
Chunk generate() override
{
if (is_valuer_emitted.exchange(true))
if (is_value_emitted.exchange(true))
return {};
auto block = getSingleValueBlock(result_value);
return Chunk(block.getColumns(), block.rows());
@ -137,7 +137,7 @@ public:
private:
std::atomic<UInt8> result_value{1};
std::atomic_bool is_valuer_emitted{false};
std::atomic_bool is_value_emitted{false};
};
}
@ -194,7 +194,7 @@ BlockIO InterpreterCheckQuery::execute()
if (settings.check_query_single_value_result)
{
auto emitter_processor = std::make_shared<TableCheckResultEmitter>();
auto input_port = &emitter_processor->getInputPort();
auto * input_port = &emitter_processor->getInputPort();
processors->emplace_back(emitter_processor);
connect(*resize_outport, *input_port);

View File

@ -876,7 +876,7 @@ IStorage::DataValidationTasksPtr StorageLog::getCheckTaskList(const ASTPtr & /*
CheckResult StorageLog::checkDataNext(DataValidationTasksPtr & check_task_list, bool & has_nothing_to_do)
{
return file_checker.checkNextEntry(static_cast<DataValidationTasks *>(check_task_list.get())->file_checker_tasks, has_nothing_to_do);
return file_checker.checkNextEntry(assert_cast<DataValidationTasks *>(check_task_list.get())->file_checker_tasks, has_nothing_to_do);
}
IStorage::ColumnSizeByName StorageLog::getColumnSizes() const

View File

@ -2213,9 +2213,9 @@ IStorage::DataValidationTasksPtr StorageMergeTree::getCheckTaskList(const ASTPtr
CheckResult StorageMergeTree::checkDataNext(DataValidationTasksPtr & check_task_list, bool & has_nothing_to_do)
{
auto local_context = static_cast<DataValidationTasks *>(check_task_list.get())->context;
if (auto part = static_cast<DataValidationTasks *>(check_task_list.get())->next())
auto * data_validation_tasks = assert_cast<DataValidationTasks *>(check_task_list.get());
auto local_context = data_validation_tasks->context;
if (auto part = data_validation_tasks->next())
{
/// If the checksums file is not present, calculate the checksums and write them to disk.
static constexpr auto checksums_path = "checksums.txt";

View File

@ -8499,7 +8499,7 @@ IStorage::DataValidationTasksPtr StorageReplicatedMergeTree::getCheckTaskList(co
CheckResult StorageReplicatedMergeTree::checkDataNext(DataValidationTasksPtr & check_task_list, bool & has_nothing_to_do)
{
if (auto part = static_cast<DataValidationTasks *>(check_task_list.get())->next())
if (auto part = assert_cast<DataValidationTasks *>(check_task_list.get())->next())
{
try
{

View File

@ -413,7 +413,7 @@ IStorage::DataValidationTasksPtr StorageStripeLog::getCheckTaskList(const ASTPtr
CheckResult StorageStripeLog::checkDataNext(DataValidationTasksPtr & check_task_list, bool & has_nothing_to_do)
{
return file_checker.checkNextEntry(static_cast<DataValidationTasks *>(check_task_list.get())->file_checker_tasks, has_nothing_to_do);
return file_checker.checkNextEntry(assert_cast<DataValidationTasks *>(check_task_list.get())->file_checker_tasks, has_nothing_to_do);
}
void StorageStripeLog::truncate(const ASTPtr &, const StorageMetadataPtr &, ContextPtr, TableExclusiveLockHolder &)