This commit is contained in:
Nikita Mikhaylov 2021-04-10 17:58:29 +03:00
parent 704fb04941
commit 4465a0627f
6 changed files with 45 additions and 6 deletions

View File

@ -365,7 +365,7 @@ function run_tests
01622_defaults_for_url_engine
# JSON functions
01666_blnsi
01666_blns
# Depends on AWS
01801_s3_distributed

View File

@ -67,8 +67,7 @@ public:
matcher = std::make_unique<re2::RE2>(makeRegexpPatternFromGlobs(globbed_uri.key));
/// Don't forget about iterator invalidation
buffer_iter = buffer.begin();
fillInternalBufferAssumeLocked();
}
std::optional<String> next()
@ -386,7 +385,10 @@ Pipe StorageS3::read(
client_auth.uri.bucket,
iterator_wrapper));
}
return Pipe::unitePipes(std::move(pipes));
auto pipe = Pipe::unitePipes(std::move(pipes));
narrowPipe(pipe, num_streams);
return pipe;
}
BlockOutputStreamPtr StorageS3::write(const ASTPtr & /*query*/, const StorageMetadataPtr & metadata_snapshot, ContextPtr local_context)

View File

@ -1,7 +1,8 @@
#include "Storages/StorageS3Distributed.h"
#if !defined(ARCADIA_BUILD)
#include <Common/config.h>
#include "Processors/Sources/SourceWithProgress.h"
#endif
#if USE_AWS_S3
@ -30,6 +31,7 @@
#include <Processors/Formats/InputStreamFromInputFormat.h>
#include <Processors/Pipe.h>
#include <Processors/Sources/SourceFromInputStream.h>
#include "Processors/Sources/SourceWithProgress.h"
#include <Processors/Sources/RemoteSource.h>
#include <Parsers/queryToString.h>
#include <Parsers/ASTTablesInSelectQuery.h>

View File

@ -1,6 +1,8 @@
#pragma once
#if !defined(ARCADIA_BUILD)
#include <Common/config.h>
#endif
#if USE_AWS_S3

View File

@ -95,7 +95,13 @@ def test_union_all(started_cluster):
SELECT * from s3Distributed(
'cluster_simple',
'http://minio1:9001/root/data/{clickhouse,database}/*', 'minio', 'minio123', 'CSV',
'name String, value UInt32, polygon Array(Array(Tuple(Float64, Float64)))') ORDER BY (name, value, polygon)""")
'name String, value UInt32, polygon Array(Array(Tuple(Float64, Float64)))') ORDER BY (name, value, polygon)
UNION ALL
SELECT * from s3Distributed(
'cluster_simple',
'http://minio1:9001/root/data/{clickhouse,database}/*', 'minio', 'minio123', 'CSV',
'name String, value UInt32, polygon Array(Array(Tuple(Float64, Float64)))') ORDER BY (name, value, polygon)
""")
# print(s3_distibuted)
assert TSV(pure_s3) == TSV(s3_distibuted)

View File

@ -0,0 +1,27 @@
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007fb11d0bedd7 in __GI___select (nfds=0, readfds=0x0, writefds=0x0, exceptfds=0x0, timeout=0x7fff4e474300) at ../sysdeps/unix/sysv/linux/select.c:41
Thread 1 (Thread 0x7fb11d5ad740 (LWP 38888)):
#0 0x00007fb11d0bedd7 in __GI___select (nfds=0, readfds=0x0, writefds=0x0, exceptfds=0x0, timeout=0x7fff4e474300) at ../sysdeps/unix/sysv/linux/select.c:41
#1 0x00000000005bbd3a in ?? ()
#2 0x000000000050a2cc in ?? ()
#3 0x000000000050bf44 in _PyEval_EvalFrameDefault ()
#4 0x00000000005096c8 in ?? ()
#5 0x000000000050a3fd in ?? ()
#6 0x000000000050bf44 in _PyEval_EvalFrameDefault ()
#7 0x0000000000507cd4 in ?? ()
#8 0x0000000000509a00 in ?? ()
#9 0x000000000050a3fd in ?? ()
#10 0x000000000050bf44 in _PyEval_EvalFrameDefault ()
#11 0x0000000000507cd4 in ?? ()
#12 0x0000000000509a00 in ?? ()
#13 0x000000000050a3fd in ?? ()
#14 0x000000000050bf44 in _PyEval_EvalFrameDefault ()
#15 0x0000000000507cd4 in ?? ()
#16 0x000000000050ae13 in PyEval_EvalCode ()
#17 0x0000000000635262 in ?? ()
#18 0x0000000000635317 in PyRun_FileExFlags ()
#19 0x0000000000638acf in PyRun_SimpleFileExFlags ()
#20 0x0000000000639671 in Py_Main ()
#21 0x00000000004b0e40 in main ()