mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
Fixed typo and casting
This commit is contained in:
parent
3c71e067fa
commit
ca4783d854
@ -159,11 +159,11 @@ namespace
|
||||
read_bytes_size += 8;
|
||||
break;
|
||||
case ValueType::vtEnum8:
|
||||
assert_cast<ColumnInt8 &>(column).insertValue(static_cast<const DataTypeEnum<Int8> &>(data_type).castToValue(value.data()).get<Int64>());
|
||||
assert_cast<ColumnInt8 &>(column).insertValue(assert_cast<const DataTypeEnum<Int8> &>(data_type).castToValue(value.data()).get<Int8>());
|
||||
read_bytes_size += assert_cast<ColumnInt8 &>(column).byteSize();
|
||||
break;
|
||||
case ValueType::vtEnum16:
|
||||
assert_cast<ColumnInt16 &>(column).insertValue(static_cast<const DataTypeEnum<Int16> &>(data_type).castToValue(value.data()).get<Int64>());
|
||||
assert_cast<ColumnInt16 &>(column).insertValue(assert_cast<const DataTypeEnum<Int16> &>(data_type).castToValue(value.data()).get<Int16>());
|
||||
read_bytes_size += assert_cast<ColumnInt16 &>(column).byteSize();
|
||||
break;
|
||||
case ValueType::vtString:
|
||||
|
@ -109,7 +109,7 @@ static NamesAndTypesList getColumnsList(const ASTExpressionList * columns_defini
|
||||
/// Transforms MySQL ENUM's list of strings to ClickHouse string-integer pairs
|
||||
/// For example ENUM('a', 'b', 'c') -> ENUM('a'=1, 'b'=2, 'c'=3)
|
||||
/// Elements on a position further than 32767 are assigned negative values, starting with -32768.
|
||||
/// Note: Enum would be transformed to Enum8 if number of ellements is less then 128, otherwise it would be transformed to Enum16.
|
||||
/// Note: Enum would be transformed to Enum8 if number of elements is less then 128, otherwise it would be transformed to Enum16.
|
||||
if (type_name_upper.find("ENUM") != String::npos)
|
||||
{
|
||||
UInt16 i = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user