From dd4ae15239052921fc58b33dfbc8b006e6176bf5 Mon Sep 17 00:00:00 2001 From: "Shankar.KV" Date: Fri, 10 Jul 2026 17:04:45 +0530 Subject: [PATCH 1/3] move benchmark and streaming containers to v1 --- udf-runner-cpp/v1/BUILD | 4 ++-- udf-runner-cpp/v1/base/protobuf_repository.bzl | 1 - udf-runner-cpp/v1/base/utils/BUILD | 1 - udf-runner-cpp/v1/base/zmq_repository.bzl | 1 - udf-runner-cpp/v1/{base => }/benchmark_container/BUILD | 4 ++-- .../v1/{base => }/benchmark_container/benchmark_container.cc | 0 .../v1/{base => }/benchmark_container/benchmark_container.h | 0 udf-runner-cpp/v1/{base => }/streaming_container/BUILD | 4 ++-- .../v1/{base => }/streaming_container/streamingcontainer.cc | 0 .../v1/{base => }/streaming_container/streamingcontainer.h | 0 10 files changed, 6 insertions(+), 9 deletions(-) rename udf-runner-cpp/v1/{base => }/benchmark_container/BUILD (59%) rename udf-runner-cpp/v1/{base => }/benchmark_container/benchmark_container.cc (100%) rename udf-runner-cpp/v1/{base => }/benchmark_container/benchmark_container.h (100%) rename udf-runner-cpp/v1/{base => }/streaming_container/BUILD (66%) rename udf-runner-cpp/v1/{base => }/streaming_container/streamingcontainer.cc (100%) rename udf-runner-cpp/v1/{base => }/streaming_container/streamingcontainer.h (100%) diff --git a/udf-runner-cpp/v1/BUILD b/udf-runner-cpp/v1/BUILD index e45cab1..62b237c 100644 --- a/udf-runner-cpp/v1/BUILD +++ b/udf-runner-cpp/v1/BUILD @@ -4,10 +4,10 @@ load("//:variables.bzl", "VM_ENABLED_DEFINES") VM_ENABLED_DEPS=select({ - "@exaudfclient_base//:benchmark": ["@exaudfclient_base//benchmark_container:benchmark_container"], + "@exaudfclient_base//:benchmark": ["//benchmark_container:benchmark_container"], "//conditions:default": [] }) + select({ - "@exaudfclient_base//:bash": ["@exaudfclient_base//streaming_container:streamingcontainer"], + "@exaudfclient_base//:bash": ["//streaming_container:streamingcontainer"], "//conditions:default": [] }) diff --git a/udf-runner-cpp/v1/base/protobuf_repository.bzl b/udf-runner-cpp/v1/base/protobuf_repository.bzl index c8c8e38..7d1fbf8 100644 --- a/udf-runner-cpp/v1/base/protobuf_repository.bzl +++ b/udf-runner-cpp/v1/base/protobuf_repository.bzl @@ -28,4 +28,3 @@ protobuf_local_repository = repository_rule( implementation=_protobuf_local_repository_impl, local = True, environ = ["PROTOBUF_LIBRARY_PREFIX","PROTOBUF_BIN","PROTOBUF_INCLUDE_PREFIX"]) - diff --git a/udf-runner-cpp/v1/base/utils/BUILD b/udf-runner-cpp/v1/base/utils/BUILD index 7805845..e6d2711 100644 --- a/udf-runner-cpp/v1/base/utils/BUILD +++ b/udf-runner-cpp/v1/base/utils/BUILD @@ -7,4 +7,3 @@ cc_library( "debug_message.h", "exceptions.h" ], ) - diff --git a/udf-runner-cpp/v1/base/zmq_repository.bzl b/udf-runner-cpp/v1/base/zmq_repository.bzl index 6488259..e190b4e 100644 --- a/udf-runner-cpp/v1/base/zmq_repository.bzl +++ b/udf-runner-cpp/v1/base/zmq_repository.bzl @@ -28,4 +28,3 @@ zmq_local_repository = repository_rule( implementation=_zmq_local_repository_impl, local = True, environ = ["ZMQ_LIBRARY_PREFIX","ZMQ_INCLUDE_PREFIX"]) - diff --git a/udf-runner-cpp/v1/base/benchmark_container/BUILD b/udf-runner-cpp/v1/benchmark_container/BUILD similarity index 59% rename from udf-runner-cpp/v1/base/benchmark_container/BUILD rename to udf-runner-cpp/v1/benchmark_container/BUILD index 2c8d028..c3c7f5d 100644 --- a/udf-runner-cpp/v1/base/benchmark_container/BUILD +++ b/udf-runner-cpp/v1/benchmark_container/BUILD @@ -4,5 +4,5 @@ cc_library( name = "benchmark_container", srcs = ["benchmark_container.cc","benchmark_container.h"], hdrs = ["benchmark_container.h"], - deps = ["//exaudflib:exaudflib-deps","//exaudflib:header", "//utils:utils"]+["//script_options_parser:scriptoptionlines"] -) \ No newline at end of file + deps = ["@exaudfclient_base//exaudflib:exaudflib-deps","@exaudfclient_base//exaudflib:header", "@exaudfclient_base//utils:utils"] +) diff --git a/udf-runner-cpp/v1/base/benchmark_container/benchmark_container.cc b/udf-runner-cpp/v1/benchmark_container/benchmark_container.cc similarity index 100% rename from udf-runner-cpp/v1/base/benchmark_container/benchmark_container.cc rename to udf-runner-cpp/v1/benchmark_container/benchmark_container.cc diff --git a/udf-runner-cpp/v1/base/benchmark_container/benchmark_container.h b/udf-runner-cpp/v1/benchmark_container/benchmark_container.h similarity index 100% rename from udf-runner-cpp/v1/base/benchmark_container/benchmark_container.h rename to udf-runner-cpp/v1/benchmark_container/benchmark_container.h diff --git a/udf-runner-cpp/v1/base/streaming_container/BUILD b/udf-runner-cpp/v1/streaming_container/BUILD similarity index 66% rename from udf-runner-cpp/v1/base/streaming_container/BUILD rename to udf-runner-cpp/v1/streaming_container/BUILD index b573639..dac7b66 100644 --- a/udf-runner-cpp/v1/base/streaming_container/BUILD +++ b/udf-runner-cpp/v1/streaming_container/BUILD @@ -4,5 +4,5 @@ cc_library( name = "streamingcontainer", srcs = ["streamingcontainer.cc","streamingcontainer.h"], hdrs = ["streamingcontainer.h"], - deps = ["//exaudflib:exaudflib-deps","//exaudflib:header"] -) \ No newline at end of file + deps = ["@exaudfclient_base//exaudflib:exaudflib-deps","@exaudfclient_base//exaudflib:header"] +) diff --git a/udf-runner-cpp/v1/base/streaming_container/streamingcontainer.cc b/udf-runner-cpp/v1/streaming_container/streamingcontainer.cc similarity index 100% rename from udf-runner-cpp/v1/base/streaming_container/streamingcontainer.cc rename to udf-runner-cpp/v1/streaming_container/streamingcontainer.cc diff --git a/udf-runner-cpp/v1/base/streaming_container/streamingcontainer.h b/udf-runner-cpp/v1/streaming_container/streamingcontainer.h similarity index 100% rename from udf-runner-cpp/v1/base/streaming_container/streamingcontainer.h rename to udf-runner-cpp/v1/streaming_container/streamingcontainer.h From f26fa35592022f88e7320345319035b03deb04be Mon Sep 17 00:00:00 2001 From: "Shankar.KV" Date: Mon, 13 Jul 2026 16:50:56 +0530 Subject: [PATCH 2/3] re-organizing the files btwn v1 and v1/base --- udf-runner-cpp/v1/BUILD | 61 +++++-------------- .../v1/base/exa_udfclient_binary_common/BUILD | 32 ++++++++++ .../exa_lib_loader.cc | 0 .../exa_lib_loader.h | 0 .../exa_set_env.cc | 0 .../exa_udfclient_binary_common/exa_set_env.h | 0 .../exa_udf_base.cc | 0 .../exa_udf_base.h | 0 .../exa_udf_client.cc | 0 .../exa_udf_client.h | 4 +- udf-runner-cpp/v1/exa_udfclient.cc | 4 +- .../exa_vm_factory.cc | 0 .../exa_vm_factory.h | 0 13 files changed, 52 insertions(+), 49 deletions(-) create mode 100644 udf-runner-cpp/v1/base/exa_udfclient_binary_common/BUILD rename udf-runner-cpp/v1/{ => base}/exa_udfclient_binary_common/exa_lib_loader.cc (100%) rename udf-runner-cpp/v1/{ => base}/exa_udfclient_binary_common/exa_lib_loader.h (100%) rename udf-runner-cpp/v1/{ => base}/exa_udfclient_binary_common/exa_set_env.cc (100%) rename udf-runner-cpp/v1/{ => base}/exa_udfclient_binary_common/exa_set_env.h (100%) rename udf-runner-cpp/v1/{ => base}/exa_udfclient_binary_common/exa_udf_base.cc (100%) rename udf-runner-cpp/v1/{ => base}/exa_udfclient_binary_common/exa_udf_base.h (100%) rename udf-runner-cpp/v1/{exa_udfclient_binary_common => }/exa_udf_client.cc (100%) rename udf-runner-cpp/v1/{exa_udfclient_binary_common => }/exa_udf_client.h (89%) rename udf-runner-cpp/v1/{exa_udfclient_binary_common => }/exa_vm_factory.cc (100%) rename udf-runner-cpp/v1/{exa_udfclient_binary_common => }/exa_vm_factory.h (100%) diff --git a/udf-runner-cpp/v1/BUILD b/udf-runner-cpp/v1/BUILD index 62b237c..b152f64 100644 --- a/udf-runner-cpp/v1/BUILD +++ b/udf-runner-cpp/v1/BUILD @@ -11,56 +11,22 @@ VM_ENABLED_DEPS=select({ "//conditions:default": [] }) - -genrule( - name = "exaudflib_output_path_header", - srcs = ["@exaudfclient_base//:libexaudflib_complete.so"], - outs = ["exaudf_lib_output_path.h"], - cmd = ''' - echo "#define CUSTOM_LIBEXAUDFLIB_PATH \\"/exaudf/external/$(rlocationpath @exaudfclient_base//:libexaudflib_complete.so)\\"" > $@ - ''', -) - -## Here it may seem like exaudflib is linked twice; one at "deps" and another at "data" -## "deps" is basically used by Bazel for compile and link dependencies. -## "data" basically places the .so file into the runtime-runfiles-location -## so that it can be loaded using apis like load_library / load_symbol later -## therefore, it is not linked twice -cc_library( - name = "exa_udfclient_binary_common_lib", - srcs = [ - "exa_udfclient_binary_common/exa_lib_loader.cc", - "exa_udfclient_binary_common/exa_set_env.cc", - "exa_udfclient_binary_common/exa_udf_base.cc", - "exa_udfclient_binary_common/exa_udf_client.cc", - "exa_udfclient_binary_common/exa_vm_factory.cc", - "//:exaudflib_output_path_header", - ], - hdrs = [ - "exa_udfclient_binary_common/exa_lib_loader.h", - "exa_udfclient_binary_common/exa_set_env.h", - "exa_udfclient_binary_common/exa_udf_base.h", - "exa_udfclient_binary_common/exa_udf_client.h", - "exa_udfclient_binary_common/exa_vm_factory.h", - ], - deps = [ - "@exaudfclient_base//exaudflib:header", - "@exaudfclient_base//utils:utils", - "@exaudfclient_base//exaudflib:exaudflib-deps", - ] + VM_ENABLED_DEPS, - defines = VM_ENABLED_DEFINES, - data = ["@exaudfclient_base//:libexaudflib_complete.so"], -) - cc_binary( name = "cpp_runner_bin", srcs = [ "exa_udfclient.cc", + "exa_udf_client.cc", + "exa_udf_client.h", + "exa_vm_factory.cc", + "exa_vm_factory.h", "@exaudfclient_base//:load_dynamic", ], linkopts = ["-ldl"], - deps = [":exa_udfclient_binary_common_lib"], - data = ["@exaudfclient_base//:libexaudflib_complete.so"] + deps = [ + "@exaudfclient_base//exa_udfclient_binary_common:exa_udfclient_binary_common_lib", + ] + VM_ENABLED_DEPS, + defines = VM_ENABLED_DEFINES, + data = ["@exaudfclient_base//:libexaudflib_complete.so"], ) ## The purpose of the static binaries is to verify if the linker namespace test work correctly. @@ -79,14 +45,19 @@ cc_binary( name = "cpp_runner_static", srcs = [ "exa_udfclient.cc", + "exa_udf_client.cc", + "exa_udf_client.h", + "exa_vm_factory.cc", + "exa_vm_factory.h", "@exaudfclient_base//:load_dynamic", ], linkopts = ["-ldl"], deps = [ - ":exa_udfclient_binary_common_lib", + "@exaudfclient_base//exa_udfclient_binary_common:exa_udfclient_binary_common_lib", "@zmq//:zmq", "@protobuf//:protobuf", - ], + ] + VM_ENABLED_DEPS, + defines = VM_ENABLED_DEFINES, data = ["@exaudfclient_base//:libexaudflib_complete.so"], ) diff --git a/udf-runner-cpp/v1/base/exa_udfclient_binary_common/BUILD b/udf-runner-cpp/v1/base/exa_udfclient_binary_common/BUILD new file mode 100644 index 0000000..83fbb37 --- /dev/null +++ b/udf-runner-cpp/v1/base/exa_udfclient_binary_common/BUILD @@ -0,0 +1,32 @@ +package(default_visibility = ["//visibility:public"]) + +genrule( + name = "exaudflib_output_path_header", + srcs = ["//:libexaudflib_complete.so"], + outs = ["exaudf_lib_output_path.h"], + cmd = ''' + echo "#define CUSTOM_LIBEXAUDFLIB_PATH \\"/exaudf/external/$(rlocationpath //:libexaudflib_complete.so)\\"" > $@ + ''', +) + +cc_library( + name = "exa_udfclient_binary_common_lib", + srcs = [ + "exa_lib_loader.cc", + "exa_set_env.cc", + "exa_udf_base.cc", + ":exaudflib_output_path_header", + ], + hdrs = [ + "exa_lib_loader.h", + "exa_set_env.h", + "exa_udf_base.h", + ], + deps = [ + "//:load_dynamic", + "//exaudflib:header", + "//exaudflib:exaudflib-deps", + "//utils:utils", + ], + data = ["//:libexaudflib_complete.so"], +) diff --git a/udf-runner-cpp/v1/exa_udfclient_binary_common/exa_lib_loader.cc b/udf-runner-cpp/v1/base/exa_udfclient_binary_common/exa_lib_loader.cc similarity index 100% rename from udf-runner-cpp/v1/exa_udfclient_binary_common/exa_lib_loader.cc rename to udf-runner-cpp/v1/base/exa_udfclient_binary_common/exa_lib_loader.cc diff --git a/udf-runner-cpp/v1/exa_udfclient_binary_common/exa_lib_loader.h b/udf-runner-cpp/v1/base/exa_udfclient_binary_common/exa_lib_loader.h similarity index 100% rename from udf-runner-cpp/v1/exa_udfclient_binary_common/exa_lib_loader.h rename to udf-runner-cpp/v1/base/exa_udfclient_binary_common/exa_lib_loader.h diff --git a/udf-runner-cpp/v1/exa_udfclient_binary_common/exa_set_env.cc b/udf-runner-cpp/v1/base/exa_udfclient_binary_common/exa_set_env.cc similarity index 100% rename from udf-runner-cpp/v1/exa_udfclient_binary_common/exa_set_env.cc rename to udf-runner-cpp/v1/base/exa_udfclient_binary_common/exa_set_env.cc diff --git a/udf-runner-cpp/v1/exa_udfclient_binary_common/exa_set_env.h b/udf-runner-cpp/v1/base/exa_udfclient_binary_common/exa_set_env.h similarity index 100% rename from udf-runner-cpp/v1/exa_udfclient_binary_common/exa_set_env.h rename to udf-runner-cpp/v1/base/exa_udfclient_binary_common/exa_set_env.h diff --git a/udf-runner-cpp/v1/exa_udfclient_binary_common/exa_udf_base.cc b/udf-runner-cpp/v1/base/exa_udfclient_binary_common/exa_udf_base.cc similarity index 100% rename from udf-runner-cpp/v1/exa_udfclient_binary_common/exa_udf_base.cc rename to udf-runner-cpp/v1/base/exa_udfclient_binary_common/exa_udf_base.cc diff --git a/udf-runner-cpp/v1/exa_udfclient_binary_common/exa_udf_base.h b/udf-runner-cpp/v1/base/exa_udfclient_binary_common/exa_udf_base.h similarity index 100% rename from udf-runner-cpp/v1/exa_udfclient_binary_common/exa_udf_base.h rename to udf-runner-cpp/v1/base/exa_udfclient_binary_common/exa_udf_base.h diff --git a/udf-runner-cpp/v1/exa_udfclient_binary_common/exa_udf_client.cc b/udf-runner-cpp/v1/exa_udf_client.cc similarity index 100% rename from udf-runner-cpp/v1/exa_udfclient_binary_common/exa_udf_client.cc rename to udf-runner-cpp/v1/exa_udf_client.cc diff --git a/udf-runner-cpp/v1/exa_udfclient_binary_common/exa_udf_client.h b/udf-runner-cpp/v1/exa_udf_client.h similarity index 89% rename from udf-runner-cpp/v1/exa_udfclient_binary_common/exa_udf_client.h rename to udf-runner-cpp/v1/exa_udf_client.h index 83c29cb..424e4d5 100644 --- a/udf-runner-cpp/v1/exa_udfclient_binary_common/exa_udf_client.h +++ b/udf-runner-cpp/v1/exa_udf_client.h @@ -1,7 +1,7 @@ #pragma once #include -#include "exa_udf_base.h" +#include "exa_udfclient_binary_common/exa_udf_base.h" #include "exaudflib/vm/swig_vm.h" class ExaUdfClient : public ExaUdfClientBase { @@ -15,4 +15,4 @@ class ExaUdfClient : public ExaUdfClientBase { protected: std::string m_languageArg; bool m_useCtpgParser = false; -}; \ No newline at end of file +}; diff --git a/udf-runner-cpp/v1/exa_udfclient.cc b/udf-runner-cpp/v1/exa_udfclient.cc index 37aae3a..4a1935c 100644 --- a/udf-runner-cpp/v1/exa_udfclient.cc +++ b/udf-runner-cpp/v1/exa_udfclient.cc @@ -1,6 +1,6 @@ -#include "exa_udfclient_binary_common/exa_udf_client.h" +#include "exa_udf_client.h" int main(int argc, char **argv) { ExaUdfClient client; return client.startClientBase(argc, argv); -} \ No newline at end of file +} diff --git a/udf-runner-cpp/v1/exa_udfclient_binary_common/exa_vm_factory.cc b/udf-runner-cpp/v1/exa_vm_factory.cc similarity index 100% rename from udf-runner-cpp/v1/exa_udfclient_binary_common/exa_vm_factory.cc rename to udf-runner-cpp/v1/exa_vm_factory.cc diff --git a/udf-runner-cpp/v1/exa_udfclient_binary_common/exa_vm_factory.h b/udf-runner-cpp/v1/exa_vm_factory.h similarity index 100% rename from udf-runner-cpp/v1/exa_udfclient_binary_common/exa_vm_factory.h rename to udf-runner-cpp/v1/exa_vm_factory.h From 73e3b85d0740736a2d3f22afa85899c01fa2d64a Mon Sep 17 00:00:00 2001 From: "Shankar.KV" Date: Mon, 13 Jul 2026 16:58:53 +0530 Subject: [PATCH 3/3] fixing build issues --- udf-runner-cpp/v1/base/exa_udfclient_binary_common/BUILD | 7 ++++++- .../v1/base/exa_udfclient_binary_common/exa_udf_base.cc | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/udf-runner-cpp/v1/base/exa_udfclient_binary_common/BUILD b/udf-runner-cpp/v1/base/exa_udfclient_binary_common/BUILD index 83fbb37..4dc9e38 100644 --- a/udf-runner-cpp/v1/base/exa_udfclient_binary_common/BUILD +++ b/udf-runner-cpp/v1/base/exa_udfclient_binary_common/BUILD @@ -9,13 +9,17 @@ genrule( ''', ) +cc_library( + name = "exaudflib_output_path_header_lib", + hdrs = [":exaudflib_output_path_header"], +) + cc_library( name = "exa_udfclient_binary_common_lib", srcs = [ "exa_lib_loader.cc", "exa_set_env.cc", "exa_udf_base.cc", - ":exaudflib_output_path_header", ], hdrs = [ "exa_lib_loader.h", @@ -23,6 +27,7 @@ cc_library( "exa_udf_base.h", ], deps = [ + ":exaudflib_output_path_header_lib", "//:load_dynamic", "//exaudflib:header", "//exaudflib:exaudflib-deps", diff --git a/udf-runner-cpp/v1/base/exa_udfclient_binary_common/exa_udf_base.cc b/udf-runner-cpp/v1/base/exa_udfclient_binary_common/exa_udf_base.cc index 56710fb..3611168 100644 --- a/udf-runner-cpp/v1/base/exa_udfclient_binary_common/exa_udf_base.cc +++ b/udf-runner-cpp/v1/base/exa_udfclient_binary_common/exa_udf_base.cc @@ -3,7 +3,7 @@ #include #include -#include "exaudf_lib_output_path.h" +#include "exa_udfclient_binary_common/exaudf_lib_output_path.h" #include "exaudflib/vm/swig_vm.h" #include "exa_udf_base.h" #include "exa_lib_loader.h" @@ -46,4 +46,4 @@ int ExaUdfClientBase::startClientBase(int argc, char** argv) { SWIGVMContainers::SWIGVM_params = new SWIGVMContainers::SWIGVM_params_t(true); set_SWIGVM_params(SWIGVMContainers::SWIGVM_params); return exaudfclient_main(vmMaker, argc, argv); -} \ No newline at end of file +}