mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 09:32:01 +00:00
Merge pull request #69980 from ClickHouse/backport/24.9/69914
Backport #69914 to 24.9: Remove dbms dependency on clickhouse_functions
This commit is contained in:
commit
78a46755bc
@ -12,11 +12,13 @@ macro(add_headers_only prefix common_path)
|
||||
add_glob(${prefix}_headers ${common_path}/*.h)
|
||||
endmacro()
|
||||
|
||||
# Assumes the path is under src and that src/ needs to be removed (valid for any subdirectory under src/)
|
||||
macro(extract_into_parent_list src_list dest_list)
|
||||
list(REMOVE_ITEM ${src_list} ${ARGN})
|
||||
get_filename_component(__dir_name ${CMAKE_CURRENT_SOURCE_DIR} NAME)
|
||||
file(RELATIVE_PATH relative ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
string(REPLACE "src/" "" relative ${relative})
|
||||
foreach(file IN ITEMS ${ARGN})
|
||||
list(APPEND ${dest_list} ${__dir_name}/${file})
|
||||
list(APPEND ${dest_list} ${relative}/${file})
|
||||
endforeach()
|
||||
set(${dest_list} "${${dest_list}}" PARENT_SCOPE)
|
||||
endmacro()
|
||||
|
@ -19,7 +19,6 @@ target_link_libraries(clickhouse-library-bridge PRIVATE
|
||||
daemon
|
||||
dbms
|
||||
bridge
|
||||
clickhouse_functions
|
||||
)
|
||||
|
||||
set_target_properties(clickhouse-library-bridge PROPERTIES RUNTIME_OUTPUT_DIRECTORY ..)
|
||||
|
@ -24,7 +24,6 @@ target_link_libraries(clickhouse-odbc-bridge PRIVATE
|
||||
clickhouse_parsers
|
||||
ch_contrib::nanodbc
|
||||
ch_contrib::unixodbc
|
||||
clickhouse_functions
|
||||
)
|
||||
|
||||
set_target_properties(clickhouse-odbc-bridge PROPERTIES RUNTIME_OUTPUT_DIRECTORY ..)
|
||||
|
@ -1,4 +1,4 @@
|
||||
if (TARGET ch_contrib::krb5)
|
||||
clickhouse_add_executable (kerberos_init kerberos_init.cpp)
|
||||
target_link_libraries (kerberos_init PRIVATE dbms clickhouse_functions ch_contrib::krb5)
|
||||
target_link_libraries (kerberos_init PRIVATE dbms ch_contrib::krb5)
|
||||
endif()
|
||||
|
@ -3,20 +3,17 @@ add_headers_and_sources(clickhouse_aggregate_functions .)
|
||||
add_headers_and_sources(clickhouse_aggregate_functions Combinators)
|
||||
|
||||
extract_into_parent_list(clickhouse_aggregate_functions_sources dbms_sources
|
||||
IAggregateFunction.cpp
|
||||
AggregateFunctionFactory.cpp
|
||||
Combinators/AggregateFunctionCombinatorFactory.cpp
|
||||
Combinators/AggregateFunctionState.cpp
|
||||
AggregateFunctionCount.cpp
|
||||
parseAggregateFunctionParameters.cpp
|
||||
AggregateFunctionFactory.cpp # AggregateFunctionFactory::instance() Used many times
|
||||
Combinators/AggregateFunctionCombinatorFactory.cpp # AggregateFunctionCombinatorFactory::instance() Used by AggregateFunctionFactory.cpp
|
||||
AggregateFunctionCount.cpp # Used in optimizeUseAggregateProjection.cpp
|
||||
IAggregateFunction.cpp # For AggregateFunctionCount.cpp, WindowTransform.cpp, FunctionsConversion.cpp...
|
||||
parseAggregateFunctionParameters.cpp # getAggregateFunctionNameAndParametersArray, getAggregateFunctionParametersArray (Graphite.cpp, ExpressionAnalyzer.cpp)
|
||||
)
|
||||
extract_into_parent_list(clickhouse_aggregate_functions_headers dbms_headers
|
||||
IAggregateFunction.h
|
||||
Combinators/IAggregateFunctionCombinator.h
|
||||
AggregateFunctionFactory.h
|
||||
Combinators/AggregateFunctionCombinatorFactory.h
|
||||
Combinators/AggregateFunctionState.h
|
||||
AggregateFunctionCount.cpp
|
||||
FactoryHelpers.h
|
||||
parseAggregateFunctionParameters.h
|
||||
)
|
||||
|
@ -1,5 +1,5 @@
|
||||
clickhouse_add_executable (quantile-t-digest quantile-t-digest.cpp)
|
||||
target_link_libraries (quantile-t-digest PRIVATE dbms clickhouse_functions clickhouse_aggregate_functions)
|
||||
target_link_libraries (quantile-t-digest PRIVATE dbms clickhouse_aggregate_functions)
|
||||
|
||||
clickhouse_add_executable (group_array_sorted group_array_sorted.cpp)
|
||||
target_link_libraries (group_array_sorted PRIVATE dbms clickhouse_functions clickhouse_aggregate_functions)
|
||||
target_link_libraries (group_array_sorted PRIVATE dbms clickhouse_aggregate_functions)
|
||||
|
@ -1,2 +1,2 @@
|
||||
clickhouse_add_executable(aggregate_function_state_deserialization_fuzzer aggregate_function_state_deserialization_fuzzer.cpp ${SRCS})
|
||||
target_link_libraries(aggregate_function_state_deserialization_fuzzer PRIVATE clickhouse_functions clickhouse_aggregate_functions)
|
||||
target_link_libraries(aggregate_function_state_deserialization_fuzzer PRIVATE clickhouse_aggregate_functions)
|
||||
|
@ -72,6 +72,28 @@ add_subdirectory (Daemon)
|
||||
add_subdirectory (Loggers)
|
||||
add_subdirectory (Formats)
|
||||
|
||||
if (OMIT_HEAVY_DEBUG_SYMBOLS)
|
||||
# Files inherited via extract_into_parent_list that would be marked to remove heavy symbols otherwise
|
||||
set_source_files_properties(
|
||||
Functions/IFunction.cpp
|
||||
Functions/FunctionFactory.cpp
|
||||
Functions/FunctionHelpers.cpp
|
||||
Functions/FunctionsLogical.cpp
|
||||
Functions/if.cpp
|
||||
Functions/multiIf.cpp
|
||||
Functions/multiMatchAny.cpp
|
||||
Functions/checkHyperscanRegexp.cpp
|
||||
Functions/CastOverloadResolver.cpp
|
||||
Functions/FunctionsConversion.cpp
|
||||
Functions/extractTimeZoneFromFunctionArguments.cpp
|
||||
Functions/GatherUtils/createArraySource.cpp
|
||||
Functions/GatherUtils/createValueSource.cpp
|
||||
Functions/GatherUtils/createArraySink.cpp
|
||||
Functions/GatherUtils/resizeConstantSize.cpp
|
||||
Functions/GatherUtils/resizeDynamicSize.cpp
|
||||
PROPERTIES COMPILE_FLAGS -g0)
|
||||
endif()
|
||||
|
||||
add_headers_and_sources(clickhouse_common_io Common)
|
||||
add_headers_and_sources(clickhouse_common_io Common/HashTable)
|
||||
add_headers_and_sources(clickhouse_common_io Common/Scheduler)
|
||||
|
@ -1,2 +1,2 @@
|
||||
clickhouse_add_executable(test-connect test_connect.cpp)
|
||||
target_link_libraries (test-connect PRIVATE dbms clickhouse_functions)
|
||||
target_link_libraries (test-connect PRIVATE dbms)
|
||||
|
@ -1,5 +1,4 @@
|
||||
clickhouse_add_executable(column_insert_many_from benchmark_column_insert_many_from.cpp)
|
||||
target_link_libraries (column_insert_many_from PRIVATE
|
||||
ch_contrib::gbenchmark_all
|
||||
dbms
|
||||
clickhouse_functions)
|
||||
dbms)
|
||||
|
@ -1,18 +1,15 @@
|
||||
clickhouse_add_executable(zkutil_test_commands zkutil_test_commands.cpp)
|
||||
target_link_libraries(zkutil_test_commands PRIVATE
|
||||
clickhouse_common_zookeeper_no_log
|
||||
clickhouse_functions
|
||||
dbms)
|
||||
|
||||
clickhouse_add_executable(zkutil_test_commands_new_lib zkutil_test_commands_new_lib.cpp)
|
||||
target_link_libraries(zkutil_test_commands_new_lib PRIVATE
|
||||
clickhouse_common_zookeeper_no_log
|
||||
clickhouse_compression
|
||||
clickhouse_functions
|
||||
dbms)
|
||||
|
||||
clickhouse_add_executable(zkutil_test_async zkutil_test_async.cpp)
|
||||
target_link_libraries(zkutil_test_async PRIVATE
|
||||
clickhouse_common_zookeeper_no_log
|
||||
clickhouse_functions
|
||||
dbms)
|
||||
|
@ -2,7 +2,6 @@ clickhouse_add_executable(integer_hash_tables_and_hashes integer_hash_tables_and
|
||||
target_link_libraries (integer_hash_tables_and_hashes PRIVATE
|
||||
ch_contrib::gbenchmark_all
|
||||
dbms
|
||||
clickhouse_functions
|
||||
ch_contrib::abseil_swiss_tables
|
||||
ch_contrib::sparsehash
|
||||
ch_contrib::wyhash
|
||||
@ -12,5 +11,4 @@ target_link_libraries (integer_hash_tables_and_hashes PRIVATE
|
||||
clickhouse_add_executable(orc_string_dictionary orc_string_dictionary.cpp)
|
||||
target_link_libraries (orc_string_dictionary PRIVATE
|
||||
ch_contrib::gbenchmark_all
|
||||
dbms
|
||||
clickhouse_functions)
|
||||
dbms)
|
||||
|
@ -11,10 +11,10 @@ clickhouse_add_executable (small_table small_table.cpp)
|
||||
target_link_libraries (small_table PRIVATE clickhouse_common_io clickhouse_common_config)
|
||||
|
||||
clickhouse_add_executable (parallel_aggregation parallel_aggregation.cpp)
|
||||
target_link_libraries (parallel_aggregation PRIVATE dbms clickhouse_functions)
|
||||
target_link_libraries (parallel_aggregation PRIVATE dbms)
|
||||
|
||||
clickhouse_add_executable (parallel_aggregation2 parallel_aggregation2.cpp)
|
||||
target_link_libraries (parallel_aggregation2 PRIVATE dbms clickhouse_functions)
|
||||
target_link_libraries (parallel_aggregation2 PRIVATE dbms)
|
||||
|
||||
clickhouse_add_executable (int_hashes_perf int_hashes_perf.cpp)
|
||||
target_link_libraries (int_hashes_perf PRIVATE clickhouse_common_io clickhouse_common_config)
|
||||
@ -26,24 +26,24 @@ clickhouse_add_executable (radix_sort radix_sort.cpp)
|
||||
target_link_libraries (radix_sort PRIVATE clickhouse_common_io clickhouse_common_config ch_contrib::pdqsort)
|
||||
|
||||
clickhouse_add_executable (arena_with_free_lists arena_with_free_lists.cpp)
|
||||
target_link_libraries (arena_with_free_lists PRIVATE dbms clickhouse_functions)
|
||||
target_link_libraries (arena_with_free_lists PRIVATE dbms)
|
||||
|
||||
clickhouse_add_executable (lru_hash_map_perf lru_hash_map_perf.cpp)
|
||||
target_link_libraries (lru_hash_map_perf PRIVATE dbms clickhouse_functions)
|
||||
target_link_libraries (lru_hash_map_perf PRIVATE dbms)
|
||||
|
||||
if (OS_LINUX)
|
||||
clickhouse_add_executable (thread_creation_latency thread_creation_latency.cpp)
|
||||
target_link_libraries (thread_creation_latency PRIVATE dbms clickhouse_functions clickhouse_common_io clickhouse_common_config)
|
||||
target_link_libraries (thread_creation_latency PRIVATE dbms clickhouse_common_io clickhouse_common_config)
|
||||
endif()
|
||||
|
||||
clickhouse_add_executable (array_cache array_cache.cpp)
|
||||
target_link_libraries (array_cache PRIVATE clickhouse_common_io clickhouse_common_config)
|
||||
|
||||
clickhouse_add_executable (space_saving space_saving.cpp)
|
||||
target_link_libraries (space_saving PRIVATE dbms clickhouse_functions clickhouse_common_io clickhouse_common_config)
|
||||
target_link_libraries (space_saving PRIVATE dbms clickhouse_common_io clickhouse_common_config)
|
||||
|
||||
clickhouse_add_executable (integer_hash_tables_benchmark integer_hash_tables_benchmark.cpp)
|
||||
target_link_libraries (integer_hash_tables_benchmark PRIVATE dbms clickhouse_functions ch_contrib::abseil_swiss_tables ch_contrib::sparsehash)
|
||||
target_link_libraries (integer_hash_tables_benchmark PRIVATE dbms ch_contrib::abseil_swiss_tables ch_contrib::sparsehash)
|
||||
|
||||
clickhouse_add_executable (cow_columns cow_columns.cpp)
|
||||
target_link_libraries (cow_columns PRIVATE clickhouse_common_io clickhouse_common_config)
|
||||
@ -69,13 +69,13 @@ clickhouse_add_executable (procfs_metrics_provider_perf procfs_metrics_provider_
|
||||
target_link_libraries (procfs_metrics_provider_perf PRIVATE clickhouse_common_io clickhouse_common_config)
|
||||
|
||||
clickhouse_add_executable (average average.cpp)
|
||||
target_link_libraries (average PRIVATE dbms clickhouse_common_io clickhouse_common_config clickhouse_functions)
|
||||
target_link_libraries (average PRIVATE dbms clickhouse_common_io clickhouse_common_config)
|
||||
|
||||
clickhouse_add_executable (shell_command_inout shell_command_inout.cpp)
|
||||
target_link_libraries (shell_command_inout PRIVATE clickhouse_common_io clickhouse_common_config)
|
||||
|
||||
clickhouse_add_executable (executable_udf executable_udf.cpp)
|
||||
target_link_libraries (executable_udf PRIVATE dbms clickhouse_functions)
|
||||
target_link_libraries (executable_udf PRIVATE dbms)
|
||||
|
||||
if (ENABLE_HIVE)
|
||||
clickhouse_add_executable (hive_metastore_client hive_metastore_client.cpp)
|
||||
@ -83,11 +83,11 @@ if (ENABLE_HIVE)
|
||||
endif()
|
||||
|
||||
clickhouse_add_executable (interval_tree interval_tree.cpp)
|
||||
target_link_libraries (interval_tree PRIVATE dbms clickhouse_functions)
|
||||
target_link_libraries (interval_tree PRIVATE dbms)
|
||||
|
||||
if (ENABLE_SSL)
|
||||
clickhouse_add_executable (encrypt_decrypt encrypt_decrypt.cpp)
|
||||
target_link_libraries (encrypt_decrypt PRIVATE dbms clickhouse_functions)
|
||||
target_link_libraries (encrypt_decrypt PRIVATE dbms)
|
||||
endif()
|
||||
|
||||
clickhouse_add_executable (check_pointer_valid check_pointer_valid.cpp)
|
||||
|
@ -1,2 +1,2 @@
|
||||
clickhouse_add_executable (mysqlxx_pool_test mysqlxx_pool_test.cpp)
|
||||
target_link_libraries (mysqlxx_pool_test PRIVATE mysqlxx clickhouse_common_config loggers_no_text_log)
|
||||
target_link_libraries (mysqlxx_pool_test PRIVATE mysqlxx dbms clickhouse_common_config loggers_no_text_log)
|
||||
|
@ -1,2 +1,2 @@
|
||||
clickhouse_add_executable (compressed_buffer compressed_buffer.cpp)
|
||||
target_link_libraries (compressed_buffer PRIVATE dbms clickhouse_functions clickhouse_common_io clickhouse_common_config clickhouse_compression)
|
||||
target_link_libraries (compressed_buffer PRIVATE dbms clickhouse_common_io clickhouse_common_config clickhouse_compression)
|
||||
|
@ -5,19 +5,19 @@
|
||||
# If you want really small size of the resulted binary, just link with fuzz_compression and clickhouse_common_io
|
||||
|
||||
clickhouse_add_executable (compressed_buffer_fuzzer compressed_buffer_fuzzer.cpp)
|
||||
target_link_libraries (compressed_buffer_fuzzer PRIVATE dbms clickhouse_functions)
|
||||
target_link_libraries (compressed_buffer_fuzzer PRIVATE dbms)
|
||||
|
||||
clickhouse_add_executable (lz4_decompress_fuzzer lz4_decompress_fuzzer.cpp)
|
||||
target_link_libraries (lz4_decompress_fuzzer PUBLIC dbms ch_contrib::lz4 clickhouse_functions)
|
||||
target_link_libraries (lz4_decompress_fuzzer PUBLIC dbms ch_contrib::lz4)
|
||||
|
||||
clickhouse_add_executable (delta_decompress_fuzzer delta_decompress_fuzzer.cpp)
|
||||
target_link_libraries (delta_decompress_fuzzer PRIVATE dbms clickhouse_functions)
|
||||
target_link_libraries (delta_decompress_fuzzer PRIVATE dbms)
|
||||
|
||||
clickhouse_add_executable (double_delta_decompress_fuzzer double_delta_decompress_fuzzer.cpp)
|
||||
target_link_libraries (double_delta_decompress_fuzzer PRIVATE dbms clickhouse_functions)
|
||||
target_link_libraries (double_delta_decompress_fuzzer PRIVATE dbms)
|
||||
|
||||
clickhouse_add_executable (encrypted_decompress_fuzzer encrypted_decompress_fuzzer.cpp)
|
||||
target_link_libraries (encrypted_decompress_fuzzer PRIVATE dbms clickhouse_functions)
|
||||
target_link_libraries (encrypted_decompress_fuzzer PRIVATE dbms)
|
||||
|
||||
clickhouse_add_executable (gcd_decompress_fuzzer gcd_decompress_fuzzer.cpp)
|
||||
target_link_libraries (gcd_decompress_fuzzer PRIVATE dbms clickhouse_functions)
|
||||
target_link_libraries (gcd_decompress_fuzzer PRIVATE dbms)
|
||||
|
@ -1,8 +1,8 @@
|
||||
clickhouse_add_executable (string_pool string_pool.cpp)
|
||||
target_link_libraries (string_pool PRIVATE dbms clickhouse_functions clickhouse_common_io clickhouse_common_config ch_contrib::sparsehash)
|
||||
target_link_libraries (string_pool PRIVATE dbms clickhouse_common_io clickhouse_common_config ch_contrib::sparsehash)
|
||||
|
||||
clickhouse_add_executable (field field.cpp)
|
||||
target_link_libraries (field PRIVATE dbms clickhouse_functions)
|
||||
target_link_libraries (field PRIVATE dbms)
|
||||
|
||||
clickhouse_add_executable (string_ref_hash string_ref_hash.cpp)
|
||||
target_link_libraries (string_ref_hash PRIVATE clickhouse_common_io clickhouse_common_config)
|
||||
|
@ -1,2 +1,2 @@
|
||||
clickhouse_add_executable (names_and_types_fuzzer names_and_types_fuzzer.cpp)
|
||||
target_link_libraries (names_and_types_fuzzer PRIVATE clickhouse_functions)
|
||||
target_link_libraries (names_and_types_fuzzer PRIVATE)
|
||||
|
@ -1,2 +1,2 @@
|
||||
clickhouse_add_executable(data_type_deserialization_fuzzer data_type_deserialization_fuzzer.cpp ${SRCS})
|
||||
target_link_libraries(data_type_deserialization_fuzzer PRIVATE clickhouse_functions clickhouse_aggregate_functions)
|
||||
target_link_libraries(data_type_deserialization_fuzzer PRIVATE clickhouse_aggregate_functions)
|
||||
|
@ -18,10 +18,10 @@ if (OMIT_HEAVY_DEBUG_SYMBOLS)
|
||||
endif()
|
||||
|
||||
extract_into_parent_list(clickhouse_dictionaries_sources dbms_sources
|
||||
DictionaryFactory.cpp
|
||||
DictionarySourceFactory.cpp
|
||||
DictionaryStructure.cpp
|
||||
getDictionaryConfigurationFromAST.cpp
|
||||
DictionaryFactory.cpp # DictionaryFactory::instance() Used by ExternalDictionariesLoader.cpp, getDictionaryConfigurationFromAST.cpp...
|
||||
DictionarySourceFactory.cpp # DictionarySourceFactory::instance() Used by DictionaryFactory.cpp
|
||||
DictionaryStructure.cpp # DictionaryStructure::DictionaryStructure (ExternalDictionariesLoader.cpp)
|
||||
getDictionaryConfigurationFromAST.cpp # getDictionaryConfigurationFromAST (StorageDictionary.cpp, AST Visitors)
|
||||
)
|
||||
extract_into_parent_list(clickhouse_dictionaries_headers dbms_headers
|
||||
DictionaryFactory.h
|
||||
|
@ -1,2 +1,2 @@
|
||||
clickhouse_add_executable(format_fuzzer format_fuzzer.cpp ${SRCS})
|
||||
target_link_libraries(format_fuzzer PRIVATE clickhouse_functions clickhouse_aggregate_functions)
|
||||
target_link_libraries(format_fuzzer PRIVATE clickhouse_aggregate_functions)
|
||||
|
@ -3,6 +3,31 @@ add_subdirectory(divide)
|
||||
include("${ClickHouse_SOURCE_DIR}/cmake/dbms_glob_sources.cmake")
|
||||
add_headers_and_sources(clickhouse_functions .)
|
||||
|
||||
# These files are moved from clickhouse_functions into dbms to make dbms self-contained (not depend on clickhouse_functions)
|
||||
# This allows less dependency and linker work (specially important when building many example executables)
|
||||
set(DBMS_FUNCTIONS
|
||||
IFunction.cpp # IFunctionOverloadResolver::getLambdaArgumentTypes, IExecutableFunction::execute... (Many AST visitors, analyzer passes, some storages...)
|
||||
FunctionFactory.cpp # FunctionFactory::instance() (Many AST visitors, analyzer passes, some storages...)
|
||||
FunctionHelpers.cpp # convertConstTupleToConstantElements, checkAndGetColumnConstStringOrFixedString, checkAndGetNestedArrayOffset ...)
|
||||
FunctionsLogical.cpp # createInternalFunctionAndOverloadResolve / createInternalFunctionOrOverloadResolver ... (Multiple)
|
||||
if.cpp # createInternalFunctionIfOverloadResolver (Used by MultiIfToIfPass.cpp)
|
||||
multiIf.cpp # createInternalMultiIfOverloadResolver (Used by IfChainToMultiIfPass.cpp)
|
||||
multiMatchAny.cpp # createInternalMultiMatchAnyOverloadResolver (Used by ConvertOrLikeChainPass.cpp)
|
||||
checkHyperscanRegexp.cpp # checkHyperscanRegexp (Used by MultiMatchAnyImpl.h, multiMatchAny.cpp)
|
||||
CastOverloadResolver.cpp # createInternalCast (Used by WindowTransform.cpp, KeyCondition.cpp...)
|
||||
FunctionsConversion.cpp # createFunctionBaseCast (Used by CastOverloadResolver.cpp)
|
||||
extractTimeZoneFromFunctionArguments.cpp # extractTimeZoneFromFunctionArguments (DateTimeTransforms.h, FunctionsConversion.cpp)
|
||||
)
|
||||
extract_into_parent_list(clickhouse_functions_sources dbms_sources ${DBMS_FUNCTIONS})
|
||||
extract_into_parent_list(clickhouse_functions_headers dbms_headers
|
||||
IFunction.h
|
||||
FunctionFactory.h
|
||||
FunctionHelpers.h
|
||||
extractTimeZoneFromFunctionArguments.h
|
||||
FunctionsLogical.h
|
||||
CastOverloadResolver.h
|
||||
)
|
||||
|
||||
add_library(clickhouse_functions_obj OBJECT ${clickhouse_functions_headers} ${clickhouse_functions_sources})
|
||||
if (OMIT_HEAVY_DEBUG_SYMBOLS)
|
||||
target_compile_options(clickhouse_functions_obj PRIVATE "-g0")
|
||||
@ -142,6 +167,10 @@ if (USE_GPERF)
|
||||
add_dependencies(generate-source generate-html-char-ref)
|
||||
endif ()
|
||||
|
||||
# Update after all the includes
|
||||
set(dbms_sources "${dbms_sources}" PARENT_SCOPE)
|
||||
set(dbms_headers "${dbms_headers}" PARENT_SCOPE)
|
||||
|
||||
target_link_libraries(clickhouse_functions_obj PUBLIC ${PUBLIC_LIBS} PRIVATE ${PRIVATE_LIBS})
|
||||
|
||||
# Used to forward the linking information to the final binaries such as clickhouse / unit_tests_dbms,
|
||||
|
@ -1,6 +1,21 @@
|
||||
include("${ClickHouse_SOURCE_DIR}/cmake/dbms_glob_sources.cmake")
|
||||
|
||||
add_headers_and_sources(clickhouse_functions_gatherutils .)
|
||||
|
||||
# Used by arrayResize.cpp
|
||||
set(DBMS_GATHERUTILS_FUNCTIONS
|
||||
createArraySource.cpp
|
||||
createValueSource.cpp
|
||||
createArraySink.cpp
|
||||
resizeConstantSize.cpp
|
||||
resizeDynamicSize.cpp
|
||||
)
|
||||
|
||||
extract_into_parent_list(clickhouse_functions_gatherutils_sources dbms_sources ${DBMS_GATHERUTILS_FUNCTIONS})
|
||||
extract_into_parent_list(clickhouse_functions_gatherutils_headers
|
||||
GatherUtils.h
|
||||
)
|
||||
|
||||
add_library(clickhouse_functions_gatherutils ${clickhouse_functions_gatherutils_sources} ${clickhouse_functions_gatherutils_headers})
|
||||
target_link_libraries(clickhouse_functions_gatherutils PRIVATE dbms)
|
||||
|
||||
|
@ -1,5 +1,18 @@
|
||||
include("${ClickHouse_SOURCE_DIR}/cmake/dbms_glob_sources.cmake")
|
||||
include(CMakePrintHelpers)
|
||||
|
||||
add_headers_and_sources(clickhouse_functions_array .)
|
||||
|
||||
# createInternalFunctionHasOverloadResolver, FunctionArrayResize, FunctionEmptyArrayToSingle
|
||||
# Used by ArrayExistsToHasPass.cpp and ArrayJoinAction.cpp
|
||||
set(DBMS_ARRAY_FUNCTIONS
|
||||
arrayResize.cpp
|
||||
has.cpp
|
||||
emptyArrayToSingle.cpp
|
||||
)
|
||||
extract_into_parent_list(clickhouse_functions_array_sources dbms_sources ${DBMS_ARRAY_FUNCTIONS})
|
||||
extract_into_parent_list(clickhouse_functions_headers dbms_headers arrayResize.h has.h emptyArrayToSingle.h)
|
||||
|
||||
add_library(clickhouse_functions_array OBJECT ${clickhouse_functions_array_sources} ${clickhouse_functions_array_headers})
|
||||
target_link_libraries(clickhouse_functions_array PRIVATE dbms clickhouse_functions_gatherutils)
|
||||
|
||||
|
@ -38,7 +38,7 @@ clickhouse_add_executable (o_direct_and_dirty_pages o_direct_and_dirty_pages.cpp
|
||||
target_link_libraries (o_direct_and_dirty_pages PRIVATE clickhouse_common_io clickhouse_common_config)
|
||||
|
||||
clickhouse_add_executable (io_operators io_operators.cpp)
|
||||
target_link_libraries (io_operators PRIVATE dbms clickhouse_functions clickhouse_common_io clickhouse_common_config)
|
||||
target_link_libraries (io_operators PRIVATE dbms clickhouse_common_io clickhouse_common_config)
|
||||
|
||||
clickhouse_add_executable (write_int write_int.cpp)
|
||||
target_link_libraries (write_int PRIVATE clickhouse_common_io clickhouse_common_config)
|
||||
@ -56,7 +56,7 @@ clickhouse_add_executable (limit_read_buffer2 limit_read_buffer2.cpp)
|
||||
target_link_libraries (limit_read_buffer2 PRIVATE clickhouse_common_io clickhouse_common_config)
|
||||
|
||||
clickhouse_add_executable (parse_date_time_best_effort parse_date_time_best_effort.cpp)
|
||||
target_link_libraries (parse_date_time_best_effort PRIVATE dbms clickhouse_functions clickhouse_common_io clickhouse_common_config)
|
||||
target_link_libraries (parse_date_time_best_effort PRIVATE dbms clickhouse_common_io clickhouse_common_config)
|
||||
|
||||
clickhouse_add_executable (zlib_ng_bug zlib_ng_bug.cpp)
|
||||
target_link_libraries (zlib_ng_bug PRIVATE ch_contrib::zlib clickhouse_common_io clickhouse_common_config)
|
||||
@ -75,7 +75,7 @@ target_link_libraries (hadoop_snappy_read_buffer PRIVATE clickhouse_common_io cl
|
||||
|
||||
if (TARGET ch_contrib::hdfs)
|
||||
clickhouse_add_executable (read_buffer_from_hdfs read_buffer_from_hdfs.cpp)
|
||||
target_link_libraries (read_buffer_from_hdfs PRIVATE dbms clickhouse_functions ch_contrib::hdfs)
|
||||
target_link_libraries (read_buffer_from_hdfs PRIVATE dbms ch_contrib::hdfs)
|
||||
endif ()
|
||||
|
||||
|
||||
|
@ -1,35 +1,35 @@
|
||||
clickhouse_add_executable (hash_map hash_map.cpp)
|
||||
target_link_libraries (hash_map PRIVATE dbms clickhouse_functions clickhouse_functions ch_contrib::sparsehash)
|
||||
target_link_libraries (hash_map PRIVATE dbms ch_contrib::sparsehash)
|
||||
|
||||
clickhouse_add_executable (hash_map_lookup hash_map_lookup.cpp)
|
||||
target_link_libraries (hash_map_lookup PRIVATE dbms clickhouse_functions clickhouse_common_io clickhouse_common_config clickhouse_compression)
|
||||
target_link_libraries (hash_map_lookup PRIVATE dbms clickhouse_common_io clickhouse_common_config clickhouse_compression)
|
||||
|
||||
clickhouse_add_executable (hash_map3 hash_map3.cpp)
|
||||
target_link_libraries (hash_map3 PRIVATE dbms clickhouse_functions clickhouse_common_io clickhouse_common_config clickhouse_compression ch_contrib::farmhash ch_contrib::metrohash)
|
||||
target_link_libraries (hash_map3 PRIVATE dbms clickhouse_common_io clickhouse_common_config clickhouse_compression ch_contrib::farmhash ch_contrib::metrohash)
|
||||
|
||||
clickhouse_add_executable (hash_map_string hash_map_string.cpp)
|
||||
target_link_libraries (hash_map_string PRIVATE dbms clickhouse_functions clickhouse_common_io clickhouse_common_config clickhouse_compression ch_contrib::sparsehash)
|
||||
target_link_libraries (hash_map_string PRIVATE dbms clickhouse_common_io clickhouse_common_config clickhouse_compression ch_contrib::sparsehash)
|
||||
|
||||
clickhouse_add_executable (hash_map_string_2 hash_map_string_2.cpp)
|
||||
target_link_libraries (hash_map_string_2 PRIVATE dbms clickhouse_functions clickhouse_common_io clickhouse_common_config clickhouse_compression)
|
||||
target_link_libraries (hash_map_string_2 PRIVATE dbms clickhouse_common_io clickhouse_common_config clickhouse_compression)
|
||||
|
||||
clickhouse_add_executable (hash_map_string_3 hash_map_string_3.cpp)
|
||||
target_link_libraries (hash_map_string_3 PRIVATE dbms clickhouse_functions clickhouse_common_io clickhouse_common_config clickhouse_compression ch_contrib::farmhash ch_contrib::metrohash)
|
||||
target_link_libraries (hash_map_string_3 PRIVATE dbms clickhouse_common_io clickhouse_common_config clickhouse_compression ch_contrib::farmhash ch_contrib::metrohash)
|
||||
|
||||
clickhouse_add_executable (hash_map_string_small hash_map_string_small.cpp)
|
||||
target_link_libraries (hash_map_string_small PRIVATE dbms clickhouse_functions clickhouse_common_io clickhouse_common_config clickhouse_compression ch_contrib::sparsehash)
|
||||
target_link_libraries (hash_map_string_small PRIVATE dbms clickhouse_common_io clickhouse_common_config clickhouse_compression ch_contrib::sparsehash)
|
||||
|
||||
clickhouse_add_executable (string_hash_map string_hash_map.cpp)
|
||||
target_link_libraries (string_hash_map PRIVATE dbms clickhouse_functions clickhouse_common_io clickhouse_common_config clickhouse_compression ch_contrib::sparsehash)
|
||||
target_link_libraries (string_hash_map PRIVATE dbms clickhouse_common_io clickhouse_common_config clickhouse_compression ch_contrib::sparsehash)
|
||||
|
||||
clickhouse_add_executable (string_hash_map_aggregation string_hash_map.cpp)
|
||||
target_link_libraries (string_hash_map_aggregation PRIVATE dbms clickhouse_functions clickhouse_common_io clickhouse_common_config clickhouse_compression)
|
||||
target_link_libraries (string_hash_map_aggregation PRIVATE dbms clickhouse_common_io clickhouse_common_config clickhouse_compression)
|
||||
|
||||
clickhouse_add_executable (string_hash_set string_hash_set.cpp)
|
||||
target_link_libraries (string_hash_set PRIVATE dbms clickhouse_functions clickhouse_common_io clickhouse_common_config clickhouse_compression)
|
||||
target_link_libraries (string_hash_set PRIVATE dbms clickhouse_common_io clickhouse_common_config clickhouse_compression)
|
||||
|
||||
clickhouse_add_executable (two_level_hash_map two_level_hash_map.cpp)
|
||||
target_link_libraries (two_level_hash_map PRIVATE dbms clickhouse_functions clickhouse_common_io clickhouse_common_config clickhouse_compression ch_contrib::sparsehash)
|
||||
target_link_libraries (two_level_hash_map PRIVATE dbms clickhouse_common_io clickhouse_common_config clickhouse_compression ch_contrib::sparsehash)
|
||||
|
||||
clickhouse_add_executable (jit_example jit_example.cpp)
|
||||
target_link_libraries (jit_example PRIVATE dbms clickhouse_functions)
|
||||
|
@ -1,7 +1,6 @@
|
||||
clickhouse_add_executable(execute_query_fuzzer execute_query_fuzzer.cpp)
|
||||
target_link_libraries(execute_query_fuzzer PRIVATE
|
||||
dbms
|
||||
clickhouse_functions
|
||||
clickhouse_table_functions
|
||||
clickhouse_aggregate_functions
|
||||
clickhouse_dictionaries
|
||||
|
@ -4,7 +4,7 @@ clickhouse_add_executable(lexer lexer.cpp ${SRCS})
|
||||
target_link_libraries(lexer PRIVATE clickhouse_parsers clickhouse_common_config)
|
||||
|
||||
clickhouse_add_executable(select_parser select_parser.cpp ${SRCS} "../../Server/ServerType.cpp")
|
||||
target_link_libraries(select_parser PRIVATE dbms clickhouse_functions)
|
||||
target_link_libraries(select_parser PRIVATE dbms)
|
||||
|
||||
clickhouse_add_executable(create_parser create_parser.cpp ${SRCS} "../../Server/ServerType.cpp")
|
||||
target_link_libraries(create_parser PRIVATE dbms clickhouse_functions)
|
||||
target_link_libraries(create_parser PRIVATE dbms)
|
||||
|
@ -1,8 +1,8 @@
|
||||
clickhouse_add_executable (merge_selector merge_selector.cpp)
|
||||
target_link_libraries (merge_selector PRIVATE dbms clickhouse_functions)
|
||||
target_link_libraries (merge_selector PRIVATE dbms)
|
||||
|
||||
clickhouse_add_executable (merge_selector2 merge_selector2.cpp)
|
||||
target_link_libraries (merge_selector2 PRIVATE dbms clickhouse_functions)
|
||||
target_link_libraries (merge_selector2 PRIVATE dbms)
|
||||
|
||||
clickhouse_add_executable (get_current_inserts_in_replicated get_current_inserts_in_replicated.cpp)
|
||||
target_link_libraries (get_current_inserts_in_replicated PRIVATE dbms clickhouse_common_config clickhouse_common_zookeeper clickhouse_functions)
|
||||
target_link_libraries (get_current_inserts_in_replicated PRIVATE dbms clickhouse_common_config clickhouse_common_zookeeper)
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
clickhouse_add_executable (mergetree_checksum_fuzzer mergetree_checksum_fuzzer.cpp)
|
||||
# Look at comment around fuzz_compression target declaration
|
||||
target_link_libraries (mergetree_checksum_fuzzer PRIVATE dbms clickhouse_functions)
|
||||
target_link_libraries (mergetree_checksum_fuzzer PRIVATE dbms)
|
||||
|
||||
clickhouse_add_executable (columns_description_fuzzer columns_description_fuzzer.cpp)
|
||||
target_link_libraries (columns_description_fuzzer PRIVATE clickhouse_functions)
|
||||
target_link_libraries (columns_description_fuzzer PRIVATE)
|
||||
|
@ -6,6 +6,8 @@ if (TARGET ch_contrib::hivemetastore)
|
||||
add_headers_and_sources(clickhouse_table_functions Hive)
|
||||
endif ()
|
||||
|
||||
# TableFunctionFactory::instance(), TableFunctionFactory::get(), DB::ITableFunction::execute(), TableFunctionView::getSelectQuery()
|
||||
# Used by different storages and analyzer
|
||||
extract_into_parent_list(clickhouse_table_functions_sources dbms_sources
|
||||
ITableFunction.cpp
|
||||
TableFunctionView.cpp
|
||||
|
Loading…
Reference in New Issue
Block a user