mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-14 19:45:11 +00:00
Merge pull request #44400 from Avogar/fix-orc
Fix reading Map type in ORC format
This commit is contained in:
commit
d8e1945111
@ -101,7 +101,7 @@ static size_t countIndicesForType(std::shared_ptr<arrow::DataType> type)
|
||||
if (type->id() == arrow::Type::MAP)
|
||||
{
|
||||
auto * map_type = static_cast<arrow::MapType *>(type.get());
|
||||
return countIndicesForType(map_type->key_type()) + countIndicesForType(map_type->item_type());
|
||||
return countIndicesForType(map_type->key_type()) + countIndicesForType(map_type->item_type()) + 1;
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
@ -0,0 +1,3 @@
|
||||
0 {0:0} Hello
|
||||
1 {1:1} Hello
|
||||
2 {2:2} Hello
|
9
tests/queries/0_stateless/02510_orc_map_indexes.sh
Executable file
9
tests/queries/0_stateless/02510_orc_map_indexes.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
# Tags: no-parallel, no-fasttest
|
||||
|
||||
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
# shellcheck source=../shell_config.sh
|
||||
. "$CURDIR"/../shell_config.sh
|
||||
|
||||
$CLICKHOUSE_LOCAL -q "select number, map(number, number) as map, 'Hello' as str from numbers(3) format ORC" | $CLICKHOUSE_LOCAL --input-format=ORC -q "select * from table";
|
||||
|
Loading…
Reference in New Issue
Block a user