Skip to content

Commit be0ea1b

Browse files
ksseniiarthurpassos
authored andcommitted
Merge pull request ClickHouse#87621 from arthurpassos/do_not_put_hive_columns_in_format_header
Move 03631_hive_columns_not_in_format_header.sql to the proper file location
1 parent f2dd074 commit be0ea1b

File tree

4 files changed

+3
-2
lines changed

4 files changed

+3
-2
lines changed

src/Storages/HivePartitioningUtils.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <Formats/EscapingRuleUtils.h>
1010
#include <Formats/FormatFactory.h>
1111
#include <Processors/Chunk.h>
12+
#include <DataTypes/IDataType.h>
1213

1314
namespace DB
1415
{
@@ -85,7 +86,7 @@ NamesAndTypesList extractHivePartitionColumnsFromPath(
8586
{
8687
if (const auto type = tryInferDataTypeByEscapingRule(value, format_settings ? *format_settings : getFormatSettings(context), FormatSettings::EscapingRule::Raw))
8788
{
88-
if (type->canBeInsideLowCardinality())
89+
if (type->canBeInsideLowCardinality() && isStringOrFixedString(type))
8990
{
9091
hive_partition_columns_to_read_from_file_path.emplace_back(key, std::make_shared<DataTypeLowCardinality>(type));
9192
}

tests/queries/0_stateless/03203_hive_style_partitioning.reference

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Elizabeth Delgado
3131
Elizabeth Cross
3232
42 2020-01-01
3333
[1,2,3] 42.42
34-
Array(Int64) LowCardinality(Float64)
34+
Array(Int64) Float64
3535
101
3636
2071
3737
2071

03631_hive_columns_not_in_format_header.reference renamed to tests/queries/0_stateless/03631_hive_columns_not_in_format_header.reference

File renamed without changes.

03631_hive_columns_not_in_format_header.sql renamed to tests/queries/0_stateless/03631_hive_columns_not_in_format_header.sql

File renamed without changes.

0 commit comments

Comments
 (0)