mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 17:12:03 +00:00
Fixed error
This commit is contained in:
parent
af5041532a
commit
bbaece6900
@ -156,7 +156,7 @@ bool ClickHouseDictionarySource::isModified() const
|
|||||||
if (!invalidate_query.empty())
|
if (!invalidate_query.empty())
|
||||||
{
|
{
|
||||||
auto response = doInvalidateQuery(invalidate_query);
|
auto response = doInvalidateQuery(invalidate_query);
|
||||||
LOG_TRACE(log, "Invalidate query has returned: '" << response << "', previous value: '" << invalidate_query_response << "'");
|
LOG_TRACE(log, "Invalidate query has returned: " << response << ", previous value: " << invalidate_query_response);
|
||||||
if (invalidate_query_response == response)
|
if (invalidate_query_response == response)
|
||||||
return false;
|
return false;
|
||||||
invalidate_query_response = response;
|
invalidate_query_response = response;
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
#include <DataStreams/IBlockInputStream.h>
|
#include <DataStreams/IBlockInputStream.h>
|
||||||
#include <IO/WriteBufferFromString.h>
|
#include <IO/WriteBufferFromString.h>
|
||||||
|
|
||||||
|
|
||||||
namespace DB
|
namespace DB
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -32,16 +33,13 @@ std::string readInvalidateQuery(IBlockInputStream & block_input_stream)
|
|||||||
|
|
||||||
WriteBufferFromOwnString out;
|
WriteBufferFromOwnString out;
|
||||||
auto & column_type = block.getByPosition(0);
|
auto & column_type = block.getByPosition(0);
|
||||||
column_type.type->serializeAsText(*column_type.column, 0, out, FormatSettings());
|
column_type.type->serializeAsTextQuoted(*column_type.column->convertToFullColumnIfConst(), 0, out, FormatSettings());
|
||||||
|
|
||||||
while ((block = block_input_stream.read()))
|
while ((block = block_input_stream.read()))
|
||||||
{
|
|
||||||
if (block.rows() > 0)
|
if (block.rows() > 0)
|
||||||
throw Exception("Expected single row in resultset, got at least " + std::to_string(rows + 1), ErrorCodes::TOO_MANY_ROWS);
|
throw Exception("Expected single row in resultset, got at least " + std::to_string(rows + 1), ErrorCodes::TOO_MANY_ROWS);
|
||||||
}
|
|
||||||
|
|
||||||
block_input_stream.readSuffix();
|
block_input_stream.readSuffix();
|
||||||
|
|
||||||
return out.str();
|
return out.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user