Merge pull request #57979 from ClickHouse/add-test-49708

Add a test for #49708
This commit is contained in:
Alexey Milovidov 2023-12-18 21:29:11 +01:00 committed by GitHub
commit 1a7de9158f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 8 deletions

View File

@ -10,7 +10,6 @@
#include <Interpreters/Context.h>
#include <Interpreters/evaluateConstantExpression.h>
#include <Parsers/ASTCreateQuery.h>
#include <Parsers/ASTSelectQuery.h>
#include <Parsers/ASTIdentifier_fwd.h>
#include <Parsers/ASTInsertQuery.h>
@ -26,8 +25,6 @@
#include <IO/Archives/createArchiveReader.h>
#include <IO/Archives/IArchiveReader.h>
#include <DataTypes/DataTypeLowCardinality.h>
#include <DataTypes/DataTypeString.h>
#include <Formats/FormatFactory.h>
#include <Formats/ReadSchemaUtils.h>
#include <Processors/Formats/IInputFormat.h>
@ -39,7 +36,6 @@
#include <Processors/Formats/ISchemaReader.h>
#include <Processors/Sources/NullSource.h>
#include <Processors/Sources/ConstChunkGenerator.h>
#include <Processors/ResizeProcessor.h>
#include <Processors/Executors/PullingPipelineExecutor.h>
#include <Common/escapeForFileName.h>
@ -56,7 +52,6 @@
#include <unistd.h>
#include <filesystem>
#include <shared_mutex>
#include <cmath>
#include <algorithm>
#ifdef __clang__

View File

@ -2,17 +2,14 @@
#include <TableFunctions/ITableFunctionFileLike.h>
#include <TableFunctions/TableFunctionFile.h>
#include "Parsers/IAST_fwd.h"
#include "registerTableFunctions.h"
#include <Access/Common/AccessFlags.h>
#include <Interpreters/Context.h>
#include <Storages/ColumnsDescription.h>
#include <Storages/StorageFile.h>
#include <Storages/VirtualColumnUtils.h>
#include <TableFunctions/TableFunctionFactory.h>
#include <Interpreters/evaluateConstantExpression.h>
#include <Formats/FormatFactory.h>
#include <Parsers/ASTIdentifier_fwd.h>
namespace DB

View File

@ -0,0 +1 @@
100 4950

View File

@ -0,0 +1,17 @@
DROP TABLE IF EXISTS test;
DROP TABLE IF EXISTS test_d;
CREATE TABLE test (id UInt64, date Date)
ENGINE = MergeTree
ORDER BY id
AS select *, '2023-12-25' from numbers(100);
CREATE TABLE IF NOT EXISTS test_d as test
ENGINE = Distributed(test_cluster_one_shard_three_replicas_localhost, currentDatabase(), test);
SELECT count(), sum(id)
FROM test_d
SETTINGS allow_experimental_parallel_reading_from_replicas = 1, max_parallel_replicas = 3, prefer_localhost_replica = 0;
DROP TABLE test_d;
DROP TABLE test;