fix build and tests

This commit is contained in:
Sema Checherinda 2023-06-16 19:52:52 +02:00
parent 47484faace
commit e8d4dedbcc
3 changed files with 12 additions and 10 deletions

View File

@ -103,7 +103,7 @@ void WriteBufferFromFile::close()
if (fd < 0)
return;
next();
finalize();
if (0 != ::close(fd))
throw Exception(ErrorCodes::CANNOT_CLOSE_FILE, "Cannot close file");

View File

@ -71,19 +71,21 @@ void BlockIO::onCancelOrConnectionLoss()
{
/// Query was not finished gracefully, so we should call exception_callback
/// But we don't have a real exception
if (exception_callback)
try
{
try
{
throw Exception(ErrorCodes::QUERY_WAS_CANCELLED, "Query was cancelled or a client has unexpectedly dropped the connection");
}
catch (...)
throw Exception(ErrorCodes::QUERY_WAS_CANCELLED, "Query was cancelled or a client has unexpectedly dropped the connection");
}
catch (...)
{
if (exception_callback)
{
exception_callback(/* log_error */ false);
}
/// destroy pipeline and write buffers with an exception context
pipeline.reset();
}
pipeline.reset();
}
void BlockIO::setAllDataSent() const

View File

@ -102,9 +102,9 @@ namespace
if (!is_directory && !looking_for_directory)
{
if (re2::RE2::FullMatch(file_name, matcher))
result.emplace_back(
result.push_back(StorageHDFS::PathWithInfo{
String(ls.file_info[i].mName),
StorageHDFS::PathInfo{ls.file_info[i].mLastMod, static_cast<size_t>(ls.file_info[i].mSize)});
StorageHDFS::PathInfo{ls.file_info[i].mLastMod, static_cast<size_t>(ls.file_info[i].mSize)}});
}
else if (is_directory && looking_for_directory)
{