mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-18 13:42:02 +00:00
Fix and add a test
This commit is contained in:
parent
eed1db7e07
commit
73538117eb
@ -109,7 +109,7 @@ StoragePtr TableFunctionHDFSCluster::getStorage(
|
||||
storage = std::make_shared<StorageHDFSCluster>(
|
||||
context,
|
||||
cluster_name, filename, StorageID(getDatabaseName(), table_name),
|
||||
format, getActualTableStructure(context), ConstraintsDescription{},
|
||||
format, columns, ConstraintsDescription{},
|
||||
compression_method, structure != "auto");
|
||||
}
|
||||
return storage;
|
||||
|
@ -28,7 +28,6 @@ public:
|
||||
{
|
||||
return name;
|
||||
}
|
||||
bool hasStaticStructure() const override { return true; }
|
||||
|
||||
protected:
|
||||
StoragePtr getStorage(
|
||||
|
@ -0,0 +1 @@
|
||||
(1,2)
|
@ -0,0 +1,11 @@
|
||||
-- Tags: no-fasttest, no-parallel, no-cpu-aarch64
|
||||
-- Tag no-fasttest: Depends on Java
|
||||
|
||||
insert into table function hdfs('hdfs://localhost:12222/test_02536.jsonl', 'TSV') select '{"x" : {"a" : 1, "b" : 2}}' settings hdfs_truncate_on_insert=1;
|
||||
drop table if exists test;
|
||||
create table test (x Tuple(a UInt32, b UInt32)) engine=Memory();
|
||||
insert into test select * from hdfsCluster('test_cluster_two_shards_localhost', 'hdfs://localhost:12222/test_02536.jsonl') settings use_structure_from_insertion_table_in_table_functions=0; -- {serverError TYPE_MISMATCH}
|
||||
insert into test select * from hdfsCluster('test_cluster_two_shards_localhost', 'hdfs://localhost:12222/test_02536.jsonl') settings use_structure_from_insertion_table_in_table_functions=1;
|
||||
select * from test;
|
||||
drop table test;
|
||||
|
Loading…
Reference in New Issue
Block a user