diff options
author | Sergey Uzhakov <uzhastik@gmail.com> | 2022-04-12 19:02:35 +0300 |
---|---|---|
committer | Sergey Uzhakov <uzhastik@gmail.com> | 2022-04-12 19:02:35 +0300 |
commit | 95a2b2b3acbb47ceca323ab09acc61b4e927f802 (patch) | |
tree | 5cb9c289e9c6aa2b43fb42dfa6faca3d59c1e66c | |
parent | 77555a7567ec495c3d8b38bdcbed78e10626a8c0 (diff) | |
download | ydb-95a2b2b3acbb47ceca323ab09acc61b4e927f802.tar.gz |
YQ-1028: remove KIKIMR_UDF_DYNAMIC_LINK macro, load dynamic UDFs unconditionally
ref:7d64caaf609acee1301d4949c94b6f84c26ba03b
-rw-r--r-- | ydb/core/driver_lib/run/run.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/ydb/core/driver_lib/run/run.cpp b/ydb/core/driver_lib/run/run.cpp index 94767fa8c3..5e8a9f7ffe 100644 --- a/ydb/core/driver_lib/run/run.cpp +++ b/ydb/core/driver_lib/run/run.cpp @@ -1563,27 +1563,29 @@ void TKikimrRunner::InitializeRegistries(const TKikimrRunConfig& runConfig) { FunctionRegistry.Reset(NMiniKQL::CreateFunctionRegistry(NMiniKQL::CreateBuiltinRegistry())->Clone()); FormatFactory.Reset(new TFormatFactory); -#ifdef KIKIMR_UDF_DYNAMIC_LINK const TString& udfsDir = runConfig.AppConfig.GetUDFsDir(); TVector<TString> udfsPaths; if (!udfsDir.empty()) { if (NFs::Exists(udfsDir) && IsDir(udfsDir)) { NMiniKQL::FindUdfsInDir(udfsDir, &udfsPaths); + if (udfsPaths.empty()) { + Cout << "UDF directory " << udfsDir << " contains no dynamic UDFs. " << Endl; + } else { + Cout << "UDF directory " << udfsDir << " contains " << udfsPaths.size() << " dynamic UDFs. " << Endl; + } + NMiniKQL::TUdfModuleRemappings remappings; + for (const auto& udfPath : udfsPaths) { + FunctionRegistry->LoadUdfs(udfPath, remappings, 0); + } } else { - Cout << "UDF directory doesn't exist, no UDFs will be loaded. " << Endl; + Cout << "UDF directory " << udfsDir << " doesn't exist, no dynamic UDFs will be loaded. " << Endl; } + } else { + Cout << "UDFsDir is not specified, no dynamic UDFs will be loaded. " << Endl; } - NMiniKQL::TUdfModuleRemappings remappings; - for (const auto& udfPath : udfsPaths) { - FunctionRegistry->LoadUdfs(udfPath, remappings, 0); - } -#else - Y_UNUSED(runConfig); - NKikimr::NMiniKQL::FillStaticModules(*FunctionRegistry); -#endif NKikHouse::RegisterFormat(*FormatFactory); } |