mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
CLICKHOUSE-3885: add partition_key alias (#3166)
* Allow run integration tests from ctest: cmake .. -DENABLE_TEST_INTEGRATION=1 && ninja && ctest -V -R integration * CLICKHOUSE-3885: add partition_key alias * fix * Update ClusterCopier.cpp * Better test * fixing..
This commit is contained in:
parent
48bc69689b
commit
0047987333
@ -1512,7 +1512,7 @@ protected:
|
||||
String query;
|
||||
query += "SELECT " + fields + " FROM " + getDatabaseDotTable(from_table);
|
||||
/// TODO: Bad, it is better to rewrite with ASTLiteral(partition_key_field)
|
||||
query += " WHERE (" + queryToString(task_table.engine_push_partition_key_ast) + " = " + task_partition.name + ")";
|
||||
query += " WHERE (" + queryToString(task_table.engine_push_partition_key_ast) + " = (" + task_partition.name + " AS partition_key))";
|
||||
if (!task_table.where_condition_str.empty())
|
||||
query += " AND (" + task_table.where_condition_str + ")";
|
||||
if (!limit.empty())
|
||||
|
@ -29,3 +29,7 @@ if (ENABLE_TESTS)
|
||||
# if you want disable some tests: env TEST_OPT0='--skip compile'
|
||||
add_test(NAME with_server COMMAND bash -c "env BUILD_DIR=${ClickHouse_BINARY_DIR} INTERNAL_COMPILER_BIN_ROOT=${INTERNAL_COMPILER_BIN_ROOT} ${CMAKE_CURRENT_SOURCE_DIR}/clickhouse-test-server")
|
||||
endif ()
|
||||
|
||||
if (ENABLE_TEST_INTEGRATION)
|
||||
add_subdirectory (integration)
|
||||
endif ()
|
||||
|
2
dbms/tests/integration/CMakeLists.txt
Normal file
2
dbms/tests/integration/CMakeLists.txt
Normal file
@ -0,0 +1,2 @@
|
||||
|
||||
add_test(NAME integration WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMAND env CLICKHOUSE_TESTS_SERVER_BIN_PATH=${ClickHouse_BINARY_DIR}/dbms/programs/server/clickhouse-server CLICKHOUSE_TESTS_CLIENT_BIN_PATH=${ClickHouse_BINARY_DIR}/dbms/programs/server/clickhouse-client "CLICKHOUSE_TESTS_BASE_CONFIG_DIR=\${CLICKHOUSE_TESTS_BASE_CONFIG_DIR:=${ClickHouse_SOURCE_DIR}/dbms/programs/server/}" ${PYTEST_STARTER} pytest ${PYTEST_OPT})
|
@ -4,5 +4,4 @@
|
||||
mkdir -p /server/build_docker
|
||||
cd /server/build_docker
|
||||
cmake -G Ninja /server -DENABLE_TESTS=1
|
||||
cmake --build .
|
||||
env TEST_OPT="--skip long compile $TEST_OPT" ctest -V -j $(nproc || grep -c ^processor /proc/cpuinfo)
|
||||
ninja && env TEST_OPT="--skip long compile $TEST_OPT" ctest -V -j $(nproc || grep -c ^processor /proc/cpuinfo)
|
||||
|
Loading…
Reference in New Issue
Block a user