mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 17:41:59 +00:00
fix wrong defaults at columns tail and some build fixes
This commit is contained in:
parent
0463fb6dd3
commit
07a782e637
@ -1,9 +1,5 @@
|
||||
option (ENABLE_CAPNP "Enable Cap'n Proto" ${NOT_MSVC})
|
||||
|
||||
unset (USE_CAPNP CACHE)
|
||||
unset (USE_INTERNAL_CAPNP_LIBRARY CACHE)
|
||||
unset (MISSING_INTERNAL_CAPNP_LIBRARY CACHE)
|
||||
|
||||
if (ENABLE_CAPNP)
|
||||
# cmake 3.5.1 bug:
|
||||
# capnproto uses this cmake feature:
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include <common/readline_use.h>
|
||||
#include <common/find_first_symbols.h>
|
||||
#include <common/SetTerminalEcho.h>
|
||||
#include <Common/config.h>
|
||||
#include <Common/ClickHouseRevision.h>
|
||||
#include <Common/Stopwatch.h>
|
||||
#include <Common/Exception.h>
|
||||
|
@ -74,7 +74,7 @@ Block AddingDefaultsBlockInputStream::readImpl()
|
||||
|
||||
for (size_t row_idx = 0; row_idx < column_read.column->size(); ++row_idx)
|
||||
{
|
||||
if (defaults_mask[row_idx])
|
||||
if (row_idx < defaults_mask.size() && defaults_mask[row_idx])
|
||||
{
|
||||
if (column_def.column->isColumnConst())
|
||||
column_mixed->insert((*column_def.column)[row_idx]);
|
||||
|
@ -16,7 +16,6 @@ namespace ErrorCodes
|
||||
extern const int CANNOT_PARSE_NUMBER;
|
||||
extern const int CANNOT_PARSE_UUID;
|
||||
extern const int TOO_LARGE_STRING_SIZE;
|
||||
extern const int INCORRECT_NUMBER_OF_COLUMNS;
|
||||
}
|
||||
|
||||
|
||||
@ -62,14 +61,8 @@ Block BlockInputStreamFromRowInputStream::readImpl()
|
||||
break;
|
||||
|
||||
for (size_t column_idx = 0; column_idx < info.read_columns.size(); ++column_idx)
|
||||
{
|
||||
if (!info.read_columns[column_idx]) {
|
||||
size_t column_size = columns[column_idx]->size();
|
||||
if (column_size == 0)
|
||||
throw Exception("Unexpected empty column", ErrorCodes::INCORRECT_NUMBER_OF_COLUMNS);
|
||||
delayed_defaults.setBit(column_idx, column_size - 1);
|
||||
}
|
||||
}
|
||||
if (!info.read_columns[column_idx])
|
||||
delayed_defaults.setBit(column_idx, rows);
|
||||
}
|
||||
catch (Exception & e)
|
||||
{
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
#cmakedefine01 USE_TCMALLOC
|
||||
#cmakedefine01 USE_JEMALLOC
|
||||
#cmakedefine01 USE_CAPNP
|
||||
#cmakedefine01 USE_READLINE
|
||||
#cmakedefine01 USE_LIBEDIT
|
||||
#cmakedefine01 HAVE_READLINE_HISTORY
|
||||
|
Loading…
Reference in New Issue
Block a user