mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
fix
This commit is contained in:
parent
b80d4f8e96
commit
30b05fec42
@ -218,18 +218,18 @@ def test_write_gzip_storage(started_cluster):
|
||||
def test_virtual_columns(started_cluster):
|
||||
hdfs_api = started_cluster.make_hdfs_api()
|
||||
node1.query("create table virtual_cols (id UInt32) ENGINE = HDFS('hdfs://hdfs1:9000/file*', 'TSV')")
|
||||
started_cluster.hdfs_api.write_data("/file1", "1\n")
|
||||
started_cluster.hdfs_api.write_data("/file2", "2\n")
|
||||
started_cluster.hdfs_api.write_data("/file3", "3\n")
|
||||
hdfs_api.write_data("/file1", "1\n")
|
||||
hdfs_api.write_data("/file2", "2\n")
|
||||
hdfs_api.write_data("/file3", "3\n")
|
||||
expected = "1\tfile1\thdfs://hdfs1:9000//file1\n2\tfile2\thdfs://hdfs1:9000//file2\n3\tfile3\thdfs://hdfs1:9000//file3\n"
|
||||
assert node1.query("select id, _file as file_name, _path as file_path from virtual_cols order by id") == expected
|
||||
|
||||
|
||||
def test_read_files_with_spaces(started_cluster):
|
||||
hdfs_api = started_cluster.make_hdfs_api()
|
||||
started_cluster.hdfs_api.write_data("/test test test 1.txt", "1\n")
|
||||
started_cluster.hdfs_api.write_data("/test test test 2.txt", "2\n")
|
||||
started_cluster.hdfs_api.write_data("/test test test 3.txt", "3\n")
|
||||
hdfs_api.write_data("/test test test 1.txt", "1\n")
|
||||
hdfs_api.write_data("/test test test 2.txt", "2\n")
|
||||
hdfs_api.write_data("/test test test 3.txt", "3\n")
|
||||
node1.query("create table test (id UInt32) ENGINE = HDFS('hdfs://hdfs1:9000/test*', 'TSV')")
|
||||
assert node1.query("select * from test order by id") == "1\n2\n3\n"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user