mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
Backport #70530 to 24.8: Make async insert print nothing
This commit is contained in:
parent
60411c8e33
commit
f1702eaf25
@ -16,6 +16,7 @@
|
|||||||
#include <QueryPipeline/BlockIO.h>
|
#include <QueryPipeline/BlockIO.h>
|
||||||
#include <Processors/Transforms/CountingTransform.h>
|
#include <Processors/Transforms/CountingTransform.h>
|
||||||
#include <Processors/Transforms/getSourceFromASTInsertQuery.h>
|
#include <Processors/Transforms/getSourceFromASTInsertQuery.h>
|
||||||
|
#include <Processors/Formats/Impl/NullFormat.h>
|
||||||
|
|
||||||
#include <Parsers/ASTIdentifier.h>
|
#include <Parsers/ASTIdentifier.h>
|
||||||
#include <Parsers/ASTInsertQuery.h>
|
#include <Parsers/ASTInsertQuery.h>
|
||||||
@ -1080,6 +1081,7 @@ static std::tuple<ASTPtr, BlockIO> executeQueryImpl(
|
|||||||
auto timeout = settings.wait_for_async_insert_timeout.totalMilliseconds();
|
auto timeout = settings.wait_for_async_insert_timeout.totalMilliseconds();
|
||||||
auto source = std::make_shared<WaitForAsyncInsertSource>(std::move(result.future), timeout);
|
auto source = std::make_shared<WaitForAsyncInsertSource>(std::move(result.future), timeout);
|
||||||
res.pipeline = QueryPipeline(Pipe(std::move(source)));
|
res.pipeline = QueryPipeline(Pipe(std::move(source)));
|
||||||
|
res.pipeline.complete(std::make_shared<NullOutputFormat>(Block()));
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto & table_id = insert_query->table_id;
|
const auto & table_id = insert_query->table_id;
|
||||||
|
@ -10,3 +10,4 @@
|
|||||||
10 j
|
10 j
|
||||||
11 k
|
11 k
|
||||||
12 l
|
12 l
|
||||||
|
13 m
|
||||||
|
@ -32,6 +32,8 @@ ${CLICKHOUSE_CURL} -sS "$url" -d 'INSERT INTO async_inserts FORMAT CSVWithNames
|
|||||||
12,"l"
|
12,"l"
|
||||||
' &
|
' &
|
||||||
|
|
||||||
|
${CLICKHOUSE_CURL} -sS "$url" -H 'X-Clickhouse-Format: XML' -d 'INSERT INTO async_inserts FORMAT JSONEachRow {"id": 13, "s": "m"}' &
|
||||||
|
|
||||||
wait
|
wait
|
||||||
|
|
||||||
${CLICKHOUSE_CLIENT} -q "SELECT * FROM async_inserts ORDER BY id"
|
${CLICKHOUSE_CLIENT} -q "SELECT * FROM async_inserts ORDER BY id"
|
||||||
|
Loading…
Reference in New Issue
Block a user